Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: fix https://github.com/siyuan-note/siyuan/issues/6143

Vanessa2a0e214240c4
diff --git a/app/src/util/assets.ts b/app/src/util/assets.ts
index d55a42146f..6bf1fb4704 100644
--- a/app/src/util/assets.ts
+++ b/app/src/util/assets.ts
@@ -77,7 +77,7 @@ export const renderSnippet = () => {
} else if (item.type === "js") {
const scriptElement = document.createElement("script");
scriptElement.type = "text/javascript";
- scriptElement.text = `try{${item.content}}catch(e){console.error(e, 111)}`;
+ scriptElement.text = item.content;
scriptElement.id = `snippetJS${item.name}`;
document.head.appendChild(scriptElement);
}