Skip to content

Commit 4d2137e

Browse files
committed
fixup! fix(@angular/build): enable oxc WASI fallback in WebContainer environments
1 parent 63fe012 commit 4d2137e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎packages/angular/build/src/tools/oxc/oxc-wasi-shim.ts‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ if (
3131
return (this as { napiModule?: unknown }).napiModule;
3232
},
3333
set(value) {
34-
Object.defineProperty(this, 'addonModule', {
35-
value,
36-
writable: true,
37-
configurable: true,
38-
enumerable: true,
39-
});
34+
if (this && (typeof this === 'object' || typeof this === 'function')) {
35+
Object.defineProperty(this, 'addonModule', {
36+
value,
37+
writable: true,
38+
configurable: true,
39+
enumerable: true,
40+
});
41+
}
4042
},
4143
configurable: true,
4244
enumerable: false,

0 commit comments

Comments
 (0)