Open ttsvetko opened 7 years ago
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. I had included a fix in my pull request #46 (an unrelated feature request).
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.