mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-05 15:58:19 +00:00
Fixed:
- Failure on the first sync
This commit is contained in:
1 parent
221cccb845
commit
b4b9684a55
5 files changed
+12
-12
No files matched your search
+1
-1
@@ -66,7 +66,7 @@ export const escapeStringToHTML = (str: string) => {
|
||||
|
||||
export function resolveWithIgnoreKnownError<T>(p: Promise<T>, def: T): Promise<T> {
|
||||
return new Promise((res, rej) => {
|
||||
p.then(res).catch((ex) => (ex.status && ex.status == 404 ? res(def) : rej(ex)));
|
||||
p.then(res).catch((ex) => ((ex.status && ex.status == 404) || (ex.message && ex.message == "Request Error:404") ? res(def) : rej(ex)));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user