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)) {