Skip to content
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 opened this issue Oct 17, 2020 · 3 comments
Closed

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

Methuselah96 opened this issue Oct 17, 2020 · 3 comments
Labels
bug Something isn't working from-original-repo
Milestone

Comments

@Methuselah96
Copy link

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

@Methuselah96 Methuselah96 added needs investigation bug Something isn't working and removed needs investigation labels Nov 14, 2020
@Methuselah96 Methuselah96 added this to the 4.0 milestone Nov 20, 2020
@Methuselah96
Copy link
Author

Maybe related?: #194

@jdeniau
Copy link

jdeniau commented Nov 28, 2020

Seems fixed by #194 on master

I tried to copy the dist file of immutable on master and did the same code and it works

image

@Methuselah96
Copy link
Author

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working from-original-repo
Projects
None yet
Development

No branches or pull requests

2 participants