Skip to content

Commit eb83b86

Browse files
committed
fix(WeakMap): Fix Proxy‑based wrappers
1 parent a8fb0ea commit eb83b86

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/constructs/interface.js

+1
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,7 @@ class Interface {
10961096

10971097
this.str += `
10981098
});
1099+
utils.initWrapperImplMapping(obj, impl);
10991100
`;
11001101
}
11011102

lib/output/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function initWrapperImplMapping(wrapper, impl) {
3232
throw new Error("Internal error: wrapper->impl is already registered");
3333
}
3434
implForWrapperMap.set(wrapper, impl);
35-
Object.defineProperty(impl, wrapperSymbol, { value: wrapper });
35+
Object.defineProperty(impl, wrapperSymbol, { value: wrapper, configurable: true });
3636
}
3737

3838
function wrapperForImpl(impl) {

0 commit comments

Comments
 (0)