mirror of
https://github.com/zoldar/jenot.git
synced 2026-01-03 06:22:55 +00:00
Fix synced store in offline mode operation
This commit is contained in:
parent
fac118aadf
commit
e24bc938c1
1 changed files with 2 additions and 1 deletions
|
|
@ -19,7 +19,8 @@ const isLoggedIn = !!document.cookie
|
|||
// Notes storage configuration.
|
||||
// The storage is a combination of IndexedDB + network sync.
|
||||
// Network sync is only enabled is user is logged in.
|
||||
const Notes = new SyncedNoteStore("jenot-app", "notes", isLoggedIn && "/");
|
||||
const endpoint = isLoggedIn ? "/" : null;
|
||||
const Notes = new SyncedNoteStore("jenot-app", "notes", endpoint);
|
||||
|
||||
// Reset metadata to force full sync
|
||||
if (URL_PARAMS.has("reset-meta")) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue