morphic.js icon indicating copy to clipboard operation
morphic.js copied to clipboard

minor: Array.splice used with "null" argument instead of zero

Open davidedc opened this issue 10 years ago • 0 comments

in: this.children.splice(0, null, aNode);

it seems like the spec-proper way to write it would be this.children.splice(0, 0, aNode);

Now - it works just fine, but in all the specs I've seen that null would really be an integer. Null not being an integer, nor a number (it's an object), I'd suggest changing that to 0.

It probably works out OK in all implementations and maybe it could be even formally correct for some oddity of Javascript, but... (minor, I know.)

davidedc avatar Dec 14 '15 15:12 davidedc