humangeo / leaflet-dvf

Leaflet Data Visualization Framework
MIT License
689 stars 152 forks source link

Fix for removal of last record when filter is set #75

Closed moosehawk closed 9 years ago

moosehawk commented 9 years ago

When a filter is set on the provided data set, includeLayer will be set to false on the current record of the loop. Location is used in both the if & else if part of the statement, but its only set in the if so the indexKey will continuously be set to the last included record's key. This will incorrectly remove the last valid layer from the layers object.

sfairgrieve commented 9 years ago

Thanks for pointing this out! I'll check this out and merge tomorrow morning. I'll also add you to the list of contributors.