Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(client): compare the running flush with null instead of testing a promise

Maurice5aa9ac85299e
diff --git a/client/src/sync/mutationQueue.ts b/client/src/sync/mutationQueue.ts
index e30d3e31b..25dfd9ffb 100644
--- a/client/src/sync/mutationQueue.ts
+++ b/client/src/sync/mutationQueue.ts
@@ -287,7 +287,7 @@ export const mutationQueue = {
*/
flush(): Promise<void> {
if (isEffectivelyOffline() || !isAuthed()) return Promise.resolve()
- if (_flushRun) {
+ if (_flushRun !== null) {
_flushAgain = true
return _flushRun
}