mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-03-03 15:32:25 +02:00
Fix careless mistake
This commit is contained in:
parent
d746c1cb52
commit
6c37f7bb05
4
main.ts
4
main.ts
@ -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] = [];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user