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
Is that Array.prototype.concat
will be removed during importing polyfilll?
#1034
Comments
Array.prototype.concat
will be removed during polyfilll?Array.prototype.concat
will be removed during importing polyfilll?
Only in case if it should be polyfilled and immediately will be replaced to the proper method.
I can't reproduce that. I see only some possible issues from your incomplete |
In my case, I have caught an error thrown when accessing You can try to add a debugger point here to check whether Function.prototype.bind = function () {
var __method = this, args = $A(arguments), object = args.shift();
return function () {
+ if (!args.concat) throw new Error('Ooops');
return __method.apply(object, args.concat($A(arguments)));
};
}; |
Please, add a reproducible example. I can't reproduce it just with this code. |
@zloirock Denis, we can reproduce the problem via my commit (aleen42@937d464)
Since Karma has caught the error silently, we can get the detailed error stack by adding
|
I think |
@aleen42 it's not an external shim, since it's an incomplete polyfill that unconditionally replaces the proper feature, it's a case of a broken environment. Need to check, most likely this error happens between |
A possible direction is to confirm using native methods or shim methods of |
Yes, I think I'll do something like that since such |
👍🏼 |
Added a workaround. Note: Most likely, this check will be removed in Thanks for the issue. |
@zloirock is it better to add a testing case for such a polluted environment? But it seems not proper to add polluted code into this repository. |
Anyway, we can't detect all possible cases of broken in the userland environment. Now, we have fallbacks for cases with missed |
OK, it is just a choice, and feel free to close it. #1035 |
My previous comment was a continuation of my comment what was before.
I'm not sure that makes sense - it's a too specific case, I'll think about it, thanks. |
Recently, I have found that if I have shimmed
Function.prototype.bind
at first:And then, when running in the process of importing
core-js/shim
,Array.prototype.concat
has been removed, and an exception was thrown whencore-js
tries to call shimmedFunction.prototype.bind
.I just want to confirm whether it is due to the commit (277cb33), which wants to protect some built-in methods?
The text was updated successfully, but these errors were encountered: