You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior
Certain variable names like hasOwnProperty when transpiled and referenced with _get__ function, it returns undefined. Probably because of a safety measure, property names are blacklisted as variable names, I am not sure.
varfuncProto=Function.prototype,objectProto=Object.prototype;varfuncToString=funcProto.toString;varhasOwnProperty=objectProto.hasOwnProperty;varreIsNative=RegExp('^'+// here hasOwnProperty is undefined leading to the errorfuncToString.call(hasOwnProperty).replace(reRegExpChar,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()|for.+?(?=\\\])/g,'$1.*?')+'$');
And the _get__("hasOwnProperty") returned undefined wherease if you accessed the variable as is, i.e. hasOwnProperty it was pointing to the intended function alright.
Bug Report
Current behavior
Certain variable names like
hasOwnProperty
when transpiled and referenced with_get__
function, it returnsundefined
. Probably because of a safety measure, property names are blacklisted as variable names, I am not sure.https://stackoverflow.com/questions/62166209/object-prototype-hasownproperty-is-undefined/62170690?noredirect=1#comment109955183_62170690
Input Code
Expected behavior
The above code transpiled to:
And the
_get__("hasOwnProperty")
returnedundefined
wherease if you accessed the variable as is, i.e.hasOwnProperty
it was pointing to the intended function alright.Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.js
Environment
The text was updated successfully, but these errors were encountered: