Skip to content

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

Closed
@ovidijusr

Description

@ovidijusr

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions