Closed missinglink closed 3 years ago
Nice, I haven't touched this code in a while so I wasn't quite sure where the fix would end up. Looks like the right place. If you think any of the other for ... in
code needs fixing, go for it. Otherwise this looks good to merge 🚢
alrighty, not the most enjoyable task of the week 😆 but I've added https://github.com/pelias/openstreetmap/pull/558/commits/1c9b836ecccdd124907f4619e1498c9844d732a3 which replaces all usages of the in operator / for ... in syntax.
the nice thing about this repo is we have pretty decent unit test coverage and the end-to-end
tests which helped me resolve any issues.
I was interested in https://github.com/pelias/openstreetmap/issues/557, it seems that we are using the in operator / for ... in syntax which iterates over all properties "including inherited enumerable properties".
A quick
git grep
shows other usages of that syntax in this lib which might need attention too.closes https://github.com/pelias/openstreetmap/issues/557