Fix careless mistake

This commit is contained in:
vorotamoroz
2021-10-20 23:03:07 +09:00
parent d746c1cb52
commit 6c37f7bb05
+2 -2
View File
@@ -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] = [];
} }