polyfill
polyfill copied to clipboard
Cannot read property 'isNaN' of undefined
Uncaught TypeError: Cannot read property 'isNaN' of undefined
https://github.com/inexorabletash/polyfill/blob/master/polyfill.js#L565
Use babel 7.5.6 and @babel/env preset.
What's wrong?
That would happen if a global self
is not defined. self
is always defined in Window and Worker contexts. Presumably you're trying this outside a browser?
In the browser. The error appears after using babel. It cuts "self" in functions
Best not use them together then.
On Jul 10, 2019, at 8:23 PM, AlikDex [email protected] wrote:
In the browser. The error appears after using babel. It cuts self in functions
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
The problem was found. Babel replaces })(this);
with })(void 0);
Can be lead to a single standard of function? Everywhere put })(self);
(processed correctly)
Babel replaces
})(this);
with})(void 0);
This is probably related to "use strict";
.
ref https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Securing_JavaScript