From 82ce65fa7e2e018fc59e247f22a023d502c63a56 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 5 Jun 2023 11:30:58 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8454 --- app/src/plugin/index.ts | 4 ++++ app/src/plugin/loader.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.ts index 0275e67c0..48380d45b 100644 --- a/app/src/plugin/index.ts +++ b/app/src/plugin/index.ts @@ -73,6 +73,10 @@ export class Plugin { position?: "right" | "left", callback: (evt: MouseEvent) => void }) { + if (!options.icon.startsWith("icon") && !options.icon.startsWith(" { try { runCode(item.js, "plugin:" + encodeURIComponent(item.name))(getObject, moduleObj, exportsObj); } catch (e) { - console.error(`eval plugin ${item.name} error:`, e); + console.error(`plugin ${item.name} run error:`, e); return; } const pluginClass = (moduleObj.exports || exportsObj).default || moduleObj.exports;