mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 06:24:06 +01:00
This commit is contained in:
parent
3babe0a5bb
commit
110eab8a1a
2 changed files with 15 additions and 15 deletions
|
|
@ -48,15 +48,16 @@ export const fetchPost = (url: string, data?: any, cb?: (response: IWebSocketDat
|
|||
}
|
||||
return;
|
||||
}
|
||||
if (typeof response.msg === "undefined") {
|
||||
return;
|
||||
}
|
||||
if (["/api/search/searchRefBlock", "/api/graph/getGraph", "/api/graph/getLocalGraph"].includes(url)) {
|
||||
if (response.data.reqId && window.siyuan.reqIds[url] && window.siyuan.reqIds[url] > response.data.reqId) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (processMessage(response) && cb) {
|
||||
if (typeof response === "object" && typeof response.msg === "string" && typeof response.code === "number") {
|
||||
if (processMessage(response) && cb) {
|
||||
cb(response);
|
||||
}
|
||||
} else if (cb) {
|
||||
cb(response);
|
||||
}
|
||||
}).catch((e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue