diff --git a/addons/dexie-cloud/src/middleware-helpers/guardedTable.ts b/addons/dexie-cloud/src/middleware-helpers/guardedTable.ts index 40c3e87f1..71c604659 100644 --- a/addons/dexie-cloud/src/middleware-helpers/guardedTable.ts +++ b/addons/dexie-cloud/src/middleware-helpers/guardedTable.ts @@ -30,7 +30,7 @@ function readLock( const promise = (numWriters > 0 ? writers[numWriters - 1].then(() => fn(req), () => fn(req)) : fn(req) - ).finally(() => readers.splice(readers.indexOf(promise))); + ).finally(() => {readers.splice(readers.indexOf(promise))}); readers.push(promise); return promise; }; @@ -51,7 +51,7 @@ function writeLock( : readers.length > 0 ? allSettled(readers).then(() => fn(req)) : fn(req) - ).finally(() => writers.shift()); + ).finally(() => {writers.shift();}); writers.push(promise); return promise; };