-
Notifications
You must be signed in to change notification settings - Fork 142
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
removeLayer method throws an error #49
Comments
You're totally right about that. Would someone mind opening a pull request with the fix? |
I can do later |
Calling delete on the array index is not sufficient, as it is later iterated over; delete removes the index from the array, causing the deleted index's value to be 'undefined' when expecting an object. Instead, you must splice the item from the array to leave the indexes continuous. The current pull request #50 is insufficient. |
Fixes issue #49 - removeLayer method doesn't work
Please, accept the PR to fix the issue caused by using delete on array. |
Possible to merge this pull request and release a new version to npm? |
It looks like the pull request has been accepted, but the NPM package has not been updated |
Here it the code-fragment for 'removeLayer':
Instead of
this.layers
should bethis._layers
i guess.The text was updated successfully, but these errors were encountered: