Skip to content

L.Util.isArray() fails in IE9 on "object array" #2077

@Zverik

Description

@Zverik

I have an array in class options. The whole options object is passed to another class constructor, where it is applied bia L.setOptions(). And it turns out all arrays there turn into objects, which behave as arrays, but are undetectable by L.Util.isArray(). Thus a call to L.latLng(array) fails, because it passes the whole array as a latitude value, leaving longitude undefined.

In opera and firefox (and possible chrome) it works, but fails in IE9 (not 8!). I can't make jsfiddle at the moment (this one works, because I guess it's related to inter-window communication). So please enjoy this screenshot:

array_is_object

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions