From 7c7f3db0b8f1fdfddea1e0dd5d1a9d867cb95199 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 15 May 2023 22:26:11 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/8259 --- app/src/util/fetch.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/util/fetch.ts b/app/src/util/fetch.ts index 42430c61c..61779838e 100644 --- a/app/src/util/fetch.ts +++ b/app/src/util/fetch.ts @@ -42,7 +42,10 @@ export const fetchPost = (url: string, data?: any, cb?: (response: IWebSocketDat } } }).then((response: IWebSocketData) => { - if (!response) { + if (typeof response === "string") { + if (cb) { + cb(response); + } return; } if (["/api/search/searchRefBlock", "/api/graph/getGraph", "/api/graph/getLocalGraph"].includes(url)) {