Skip to content

Commit

Permalink
fixup! Proxy.prototype best efforts
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Dec 31, 2024
1 parent 57be6e2 commit 9e40995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/no-trapping-shim/src/no-trapping-pony.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ const ProxyPlus = function Proxy(target, handler) {
proxyHandlerMap.set(proxy, [target, handler]);
return proxy;
};
// The `OriginalProxy` is both constructible (i.e., responsive to `new`) and
// lacks a `prototype` property. The closest we can come to this is to set
// `ProxyPlus.prototype` to `undefined`
ProxyPlus.prototype = undefined;
ProxyPlus.revocable = (target, handler) => {
const safeHandler = makeSafeHandler(handler);
const { proxy, revoke } = OriginalProxy.revocable(target, safeHandler);
Expand Down

0 comments on commit 9e40995

Please sign in to comment.