Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE10 - IE11 getting Unable to get property 'toString' of undefined or null reference when importing 'core-js/features/string' #626

Closed
ovidijusr opened this issue Aug 22, 2019 · 2 comments

Comments

@ovidijusr
Copy link

ovidijusr commented Aug 22, 2019

After I updated the core-js version from core-js 3.0.1 to 3.1 (also in newer versions) I've found the issue for IE 10 and 11 by getting error message:
Unable to get property 'toString' of undefined or null reference

According to IE it happens here:

var symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : function () {
  return '';
};

It happens when I put string feauture before 'string' object from yup library, like this:

import 'core-js/features/string';
import { string as yupString } from 'yup';

But when I try to change the places of imports, everything works fine.

import 'core-js/features/string';
import { string as yupString } from 'yup';

My guess is that because string object from yup somehow overlaps with core-js string feauture. But the interesting thing for me is that the previous version worked fine, and also the newer (3.1+) works with edge, chrome.

I know this is nothing super important, but it looks like an interesting case

Thanks!

@zloirock
Copy link
Owner

zloirock commented Aug 22, 2019

I think that this entry point contains Symbol.matchAll polyfill, but not the full Symbol polyfill, so global Symbol in this case hasn't prototype property. You could load core-js/features/symbol before yup for fixing this issue. If it's this case, I'm not sure that it's already can be fixed on core-js side since it will break core-js entry points architecture.

@zloirock
Copy link
Owner

I'll remove exposing Symbol.matchAll from esnext.string.match-all without es.symbol.match-all. Let's hope that it will not break anything -)

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

No branches or pull requests

2 participants