Skip to content
This repository was archived by the owner on Jul 23, 2021. It is now read-only.
This repository was archived by the owner on Jul 23, 2021. It is now read-only.

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

Closed
@Methuselah96

Description

@Methuselah96

From @cvoege on Wed, 07 Nov 2018 19:21:33 GMT

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.

Copied from original issue: immutable-js#1645

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions