Skip to content

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

:bug: https://github.com/siyuan-note/siyuan/issues/17509

Vanessa9edbaf8cd719
diff --git a/app/src/plugin/uninstall.ts b/app/src/plugin/uninstall.ts
index ed033d0b2f..7075308045 100644
--- a/app/src/plugin/uninstall.ts
+++ b/app/src/plugin/uninstall.ts
@@ -76,19 +76,19 @@ export const uninstall = (app: App, name: string, isReload: boolean) => {
}
}
- if (Object.keys(window.siyuan.layout.leftDock.data).includes(key)) {
+ if (window.siyuan.layout.leftDock && Object.keys(window.siyuan.layout.leftDock.data).includes(key)) {
window.siyuan.layout.leftDock.remove(key);
if (dockIconElement) {
window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name][key].position =
"Left" + (dockIconElement.getAttribute("data-index") === "0" ? "Top" : "Bottom");
}
- } else if (Object.keys(window.siyuan.layout.rightDock.data).includes(key)) {
+ } else if (window.siyuan.layout.rightDock && Object.keys(window.siyuan.layout.rightDock.data).includes(key)) {
window.siyuan.layout.rightDock.remove(key);
if (dockIconElement) {
window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name][key].position =
"Right" + (dockIconElement.getAttribute("data-index") === "0" ? "Top" : "Bottom");
}
- } else if (Object.keys(window.siyuan.layout.bottomDock.data).includes(key)) {
+ } else if (window.siyuan.layout.bottomDock && Object.keys(window.siyuan.layout.bottomDock.data).includes(key)) {
window.siyuan.layout.bottomDock.remove(key);
if (dockIconElement) {
window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name][key].position =