Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/7818

Vanessa37f859221a1a
diff --git a/app/src/util/processMessage.ts b/app/src/util/processMessage.ts
index 3f985ac42b..58652d66d8 100644
--- a/app/src/util/processMessage.ts
+++ b/app/src/util/processMessage.ts
@@ -1,7 +1,8 @@
-import {hideMessage, showMessage} from "../dialog/message";
/// #if !MOBILE
import {exportLayout} from "../layout/util";
/// #endif
+import {isWindow} from "./functions";
+import {hideMessage, showMessage} from "../dialog/message";
export const processMessage = (response: IWebSocketData) => {
if ("msg" === response.cmd) {
@@ -23,7 +24,11 @@ export const processMessage = (response: IWebSocketData) => {
/// #if MOBILE
window.location.reload();
/// #else
- exportLayout(true);
+ if (isWindow()) {
+ window.location.reload();
+ } else {
+ exportLayout(true);
+ }
/// #endif
return false;
}