Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidedc opened this issue Dec 14, 2015 · 0 comments
Open

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

davidedc opened this issue Dec 14, 2015 · 0 comments

Comments

@davidedc
Copy link

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant