glenrobertson/leaflet-tilelayer-geojson — pull request #8 by dthompson (2013-07-07 22:50:51+00:00)
Title: when working with arrays should use splice to remove elements

If you use delete on an array it doesnt update the index, so you have undefined elements, and a inaccurate length. Array.splice should be used to remove elements from arrays.

Without this change leaflet throws an error when adding the layer while iterating through the features array if features have been deleted instead of removed with splice.