This commit is contained in:
Rizky 2024-08-02 11:21:40 +07:00
parent 897b5fbe06
commit b5dabe01a2
1 changed files with 2 additions and 5 deletions

View File

@ -83,10 +83,7 @@ export const EdPropInstanceOptions: FC<{
for (const [k, v] of Object.entries(meta.item.script?.props)) { for (const [k, v] of Object.entries(meta.item.script?.props)) {
if (v.value && v.value.length > 3) { if (v.value && v.value.length > 3) {
try { try {
const evn = new Function( const evn = new Function("arg", `arg["${k}"] = ${v.value}`);
"arg",
`arg["${k}"] = (() => { ${v.value} })()`
);
evn(arg); evn(arg);
} catch (e) {} } catch (e) {}
} }
@ -98,7 +95,7 @@ export const EdPropInstanceOptions: FC<{
try { try {
const evn = new Function( const evn = new Function(
"arg", "arg",
`arg["${k}"] = (() => { ${v.valueBuilt} })()` `arg["${k}"] = ${v.valueBuilt}`
); );
evn(arg); evn(arg);
} catch (e) { } catch (e) {