An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: fix https://github.com/siyuan-note/siyuan/issues/8851
Vanessaca747f58a410
diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.tsindex 4976a014c5..be82343592 100644--- a/app/src/protyle/util/compatibility.ts+++ b/app/src/protyle/util/compatibility.ts@@ -217,7 +217,13 @@ export const getLocalStorage = (cb: () => void) => {Constants.LOCAL_ZOOM, Constants.LOCAL_LAYOUTS, Constants.LOCAL_AI, Constants.LOCAL_PLUGINTOPUNPIN].forEach((key) => {if (typeof response.data[key] === "string") {try {- window.siyuan.storage[key] = Object.assign(defaultStorage[key], JSON.parse(response.data[key]));+ const parseData = JSON.parse(response.data[key]);+ if (typeof parseData === "number") {+ // https://github.com/siyuan-note/siyuan/issues/8852 Object.assign 会导致 number to Number+ window.siyuan.storage[key] = parseData;+ } else {+ window.siyuan.storage[key] = Object.assign(defaultStorage[key], parseData);+ }} catch (e) {window.siyuan.storage[key] = defaultStorage[key];}