Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Array detection should not use .constructor (broken in IE9) #59

@Krinkle

Description

@Krinkle

From XioShanYing on May 30, 2012 09:25:24

What steps will reproduce the problem? 1. $.toJSON([[{"a":"1"},{"b":"2"}],([[{"a":"1"},{"b":"2"}]]) will produce a string : [{"0":[{"a":"1"},{"b":"2"}]},{"1",{"0":[{"a":"1"},{"b":"2"}]}] 2. 3. What is the expected output? What do you see instead? What version of the product are you using? On what operating system? jquery.json.2.3 on win7 ie9 Please provide any additional information below. I work around this problem by change line 98 from
if(o.constructor === Array)
to
if($.isArray(0))

Original issue: http://code.google.com/p/jquery-json/issues/detail?id=59

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions