Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Regression in IE11 with version 2.6.0 #407

Open
vieira opened this issue Dec 27, 2019 · 2 comments
Open

Regression in IE11 with version 2.6.0 #407

vieira opened this issue Dec 27, 2019 · 2 comments

Comments

@vieira
Copy link

vieira commented Dec 27, 2019

We are getting an error in IE11 only since version 2.6.0 (does not happen with 2.5.7). It seems to be related with some missing polyfill in the build/dist.

unable to get property enumerable of undefined

It seems to happen in the following snippet:

function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);
  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable; // unable to get property enumerable of undefined
    });
    keys.push.apply(keys, symbols);
  }
  return keys;
}

Including the following polyfill makes the problem go away so it seems to be some missing polyfill in the build of react-ga, however we were unable to pinpoint what, exactly, is missing.

<script src="https://cdn.polyfill.io/v3/polyfill.js"></script>

Any idea?

Thank you!

@cwallervand
Copy link

Having the same issue. @vieira Did you figure out about the polyfill?

@cwallervand
Copy link

cwallervand commented Feb 10, 2020

I tried importing react-ga/core instead of react-ga: import ReactGA from 'react-ga/core'; and that got rid of the issue as far as I can see. I'm on vesrion 2.7.0 btw

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants