Skip to content

getIn and hasIn do not work on IE10/11 #1645

Closed
@cvoege

Description

@cvoege

What happened

getIn and hasIn do not work with object properties on IE10/IE11. They always return null even if the property exists.

How to reproduce

Open IE 11 or IE 10 and try this code snippet:

var map = Immutable.Map({
  mapKey: Immutable.List([
    {
      objectKey: 'objectValue'
    }
  ])
})

console.log(map.getIn(['mapKey', 0, 'objectKey'])) // Should print 'objectValue', instead prints null

Expected Behavior

getIn should return the values for the properties in a nested object. It does so on Chrome/Firefox/Safari, but on IE10 and 11 It instead always returns null.

getIn and hasIn both work correctly with Immutable.js collections in IE10 and 11, for example, this works in all browsers:

console.log(map.getIn(['mapKey', 0]).objectKey) // Prints objectValue!

It just doesn't work with object properties. I've tested this on 4.0.0-rc.12 and 4.0.0-rc.10, and the bug exists on both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions