Skip to content

Commit 3159e03

Browse files
committed
feat: allow setting modules
1 parent 6906172 commit 3159e03

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/utils/4.api.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export const mod = new Proxy(modules, {
2929
}
3030
return Reflect.get(o, key, r);
3131
},
32-
set() {},
32+
set(o, key, val, r) {
33+
if (key in o) return false;
34+
register(key, val, true);
35+
return Reflect.set(o, key, val, r);
36+
},
3337
});
3438

3539
window.underscript = new Proxy(underscript, {

0 commit comments

Comments
 (0)