Skip to content

Commit f128576

Browse files
authored
fix(sandbox): check hasSetter not hasGetter to set in sandbox createFakeObject (#582)
1 parent 566e3bd commit f128576

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/browser-vm/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export function createFakeObject(
116116
if (canWritable) {
117117
if (descriptor.writable === false) {
118118
descriptor.writable = true;
119-
} else if (hasGetter) {
119+
} else if (hasSetter) {
120120
descriptor.set = (val) => {
121121
storageBox[p] = val;
122122
return true;

0 commit comments

Comments
 (0)