From 2515a66fc344c7b269f710238dba090ff89c6ca4 Mon Sep 17 00:00:00 2001 From: Rizky Date: Tue, 9 Apr 2024 01:08:52 +0700 Subject: [PATCH] fix --- app/web/src/nova/ed/panel/popup/script/monaco.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/web/src/nova/ed/panel/popup/script/monaco.tsx b/app/web/src/nova/ed/panel/popup/script/monaco.tsx index 35929a77..2fc37c7e 100644 --- a/app/web/src/nova/ed/panel/popup/script/monaco.tsx +++ b/app/web/src/nova/ed/panel/popup/script/monaco.tsx @@ -165,9 +165,10 @@ export const EdScriptMonaco: FC<{}> = () => { `const typings = `.length ); const typings_fn = new Function( + "active", `return ${typings_src}` ); - const typings = typings_fn(); + const typings = typings_fn(active); if (typeof typings === "object") { for (const [k, v] of Object.entries(typings)) { if (typeof v === "string") { @@ -200,9 +201,10 @@ export const EdScriptMonaco: FC<{}> = () => { `const typings = `.length ); const typings_fn = new Function( + "active", `return ${typings_src}` ); - const typings = typings_fn(); + const typings = typings_fn(active); for (const [k, v] of Object.entries(typings)) { if (typeof v === "string") { types[k] = v;