for (var idx in this._legendContainer) {
var imgPath = this._legendContainer[idx];
//...
If the Array prototype has been extended to have additional functions, those functions are returned by name as idx values. You then end up with broken image src attributes containing javascript source code from that function, for example in my case:
PS: Thanks for the great plugin. It's super useful! I'll make a PR if you'd like me to fix this instead. Otherwise I need to fork it for the fix, as I need it soon.
On line 200/201:
If the
Array
prototype has been extended to have additional functions, those functions are returned by name asidx
values. You then end up with broken imagesrc
attributes containing javascript source code from that function, for example in my case:You could fix this pretty easily though with an
isNaN
check:via- https://github.com/buche/leaflet-openweathermap/blob/master/leaflet-openweathermap.js#L200-L201