mirror of
https://github.com/zoldar/jenot.git
synced 2026-01-03 14:32:54 +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.
|
// Notes storage configuration.
|
||||||
// The storage is a combination of IndexedDB + network sync.
|
// The storage is a combination of IndexedDB + network sync.
|
||||||
// Network sync is only enabled is user is logged in.
|
// 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
|
// Reset metadata to force full sync
|
||||||
if (URL_PARAMS.has("reset-meta")) {
|
if (URL_PARAMS.has("reset-meta")) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue