maydemirx / leaflet-tag-filter-button

Adds tag filter control for layers (marker, geojson features etc.) to LeafLet.
leaflet-tag-filter-button.vercel.app
MIT License
53 stars 23 forks source link

Fix for work with key/value data: missing .length in if condition #16

Closed v-gar closed 7 years ago

v-gar commented 7 years ago

When working with objects and key/value pairs as data the tag filter button doesn't interpret the data correctly because the second if condition Object.keys(data[i]) == 2 can't be true. I think you mean the length of the object so I added .length to check whether the object is a pair.

v-gar commented 7 years ago

(Sorry for the EOL, next time I disable EOL in my vim :smile:)

maydemirx commented 7 years ago

Thank you four your contributing