Closed geniuszty closed 4 years ago
Sorry ,IE11 does not have an Object.includes . I've tried to polyfill it :
if (!Object.prototype.includes) {
Object.prototype.includes = function(search, start) {
if (typeof start !== 'number') {
start = 0;
}
if (start + search.length > this.length) {
return false;
} else {
return this.indexOf(search, start) !== -1;
}
};
}
Description
Reproduce Steps
"react": "16.13.1", "react-dom": "16.13.1", "react-scripts": "2.1.2", "react-app-polyfill": "0.2.2",
Error Trace (IE11 F12 Console )
SCRIPT438: 对象不支持“includes”属性或方法 1.chunk.js (61662,57)
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
npx react-codemod rename-unsafe-lifecycles
in your project source folder.Please update the following components: Component
The above error occurred in the component:
in Component (at src/index.js:33)
Consider adding an error boundary to your tree to customize error handling behavior. Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
SCRIPT438: 对象不支持“includes”属性或方法 0.chunk.js (186849,24)