Math.max mix-up

Bounding to a minimum, we should use `Math.max`...
This commit is contained in:
Tim Mickel 2016-10-12 13:46:32 -04:00 committed by GitHub
parent 1fa97d248b
commit c00f0f55fc

View file

@ -167,7 +167,7 @@ RenderWebGL.prototype.setDrawableOrder = function (
newIndex += oldIndex;
}
if (opt_min) {
newIndex = Math.min(newIndex, opt_min);
newIndex = Math.max(newIndex, opt_min);
}
newIndex = Math.max(newIndex, 0);
// Insert at new index.