-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Following code behaves differently depending on whether the native version is loaded, or if the polyfill is required and loaded:
let of = require("core-js-pure/es/array/of");
let handler = {
has: () => {
throw 42;
},
};
let x = function () {
return new Proxy({}, handler);
};
of.call(x, 0)It throws with the polyfill, while it doesn't with the native implementation.
Although it is unusual to implement proxy to throw an exception, but even without throwing, it can still introduce silent bugs due to side effects.
Metadata
Metadata
Assignees
Labels
No labels