Closed russleyshaw closed 8 years ago
Yeah almost certainly. Should be Math.min(...)
to bound the offset between 0 and length-1.
That being said these prototype extensions are copied from siggame/Cerveau, and also copied into Joueur.js. I think I'll move the extensions into an npm module for all three projects to use, that way errors don't get fixed in one repo but not propagated to the others.
I'll close this issue when that's done.
Should this be Math.max? https://github.com/siggame/Viseur/blob/ccc73741ee1bb73e6e562e5c755c571e6d2424b2/extensions/array.js#L40