SyncGate: fix issue with empty journals not working.

Before this we weren't able to import/add entries to empty journals.
This was introduced in c6eafadb8b
master
Tom Hacohen 5 years ago
parent db75d82322
commit 7e6ed69e35

@ -182,7 +182,7 @@ export function fetchAll(etesync: CredentialsData, currentEntries: EntriesType)
const prevUid = currentEntries.get(journal.uid)?.value?.last(undefined)?.uid ?? null; const prevUid = currentEntries.get(journal.uid)?.value?.last(undefined)?.uid ?? null;
// FIXME: expose it in a non-hacky way. // FIXME: expose it in a non-hacky way.
if (prevUid === (journal as any)._json.lastUid) { if (prevUid && (prevUid === (journal as any)._json.lastUid)) {
return true; return true;
} }
return dispatch(fetchEntries(etesync, journal.uid, prevUid)); return dispatch(fetchEntries(etesync, journal.uid, prevUid));

Loading…
Cancel
Save