mirror of
https://codeberg.org/valpackett/tiddlypwa.git
synced 2026-03-15 04:10:25 -07:00
Plugin: be resilient against lastSync getting corrupted in the DB
This commit is contained in:
parent
bbb8cef786
commit
9efc82ce50
1 changed files with 2 additions and 2 deletions
|
|
@ -222,7 +222,7 @@ Formatted with `deno fmt`.
|
|||
key: cursor.key,
|
||||
url,
|
||||
token,
|
||||
lastSync: lastSync.getTime() === 0 ? 'never' : lastSync.toLocaleString(),
|
||||
lastSync: lastSync?.getTime() === 0 ? 'never' : lastSync?.toLocaleString(),
|
||||
});
|
||||
cursor.continue();
|
||||
}
|
||||
|
|
@ -594,7 +594,7 @@ Formatted with `deno fmt`.
|
|||
}
|
||||
}
|
||||
|
||||
async _syncOneUnlocked({ url, token, lastSync }, all = false, now = new Date()) {
|
||||
async _syncOneUnlocked({ url, token, lastSync = new Date(0) }, all = false, now = new Date()) {
|
||||
this.logger.log('sync started', url, lastSync, all, now);
|
||||
this.wiki.addTiddler({ title: '$:/status/TiddlyPWASyncingWith', text: url });
|
||||
const changes = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue