mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-13 00:03:11 +00:00
Fix careless mistake
This commit is contained in:
@@ -309,9 +309,9 @@ class LocalPouchDB {
|
|||||||
}
|
}
|
||||||
// wait
|
// wait
|
||||||
waitForLeafReady(id: string): Promise<boolean> {
|
waitForLeafReady(id: string): Promise<boolean> {
|
||||||
return new Promise((res) => {
|
return new Promise((res, rej) => {
|
||||||
// Set timeout.
|
// Set timeout.
|
||||||
let timer = setTimeout(() => res(false), LEAF_WAIT_TIMEOUT);
|
let timer = setTimeout(() => rej(false), LEAF_WAIT_TIMEOUT);
|
||||||
if (typeof this.leafArrivedCallbacks[id] == "undefined") {
|
if (typeof this.leafArrivedCallbacks[id] == "undefined") {
|
||||||
this.leafArrivedCallbacks[id] = [];
|
this.leafArrivedCallbacks[id] = [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user