From f8dd337412816e2612cb1817013f26953094552b Mon Sep 17 00:00:00 2001 From: Rizky Date: Tue, 16 Jan 2024 17:45:29 +0700 Subject: [PATCH] fix --- app/web/src/nova/ed/panel/popup/script/scope/scope.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx b/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx index 62d764df..5d719c6a 100644 --- a/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx +++ b/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx @@ -58,6 +58,7 @@ const gen_content = ( monaco: Monaco ) => { const added = new Set(); + for (const path of paths) { let idx = 0; let last_import = cur !== "page" ? import_map[path[0].item.id] : ""; @@ -140,6 +141,13 @@ ${src}` } for (const [k, v] of Object.entries(ex)) { + if ( + m.item.id === cur_id && + ["local", "passprop"].includes(v.type) + ) { + continue; + } + imports.add( `import { ${k} } from './${cur}_${v.id}_${v.type}_${k}';` );