Fix log spam when library hasn't been synced (#2409)

This happens a lot during tests - library.lastSync is null, so
showAutoSyncReminder() throws. It doesn't fail tests but it does spam
the log.
This commit is contained in:
Abe Jellinek 2022-03-12 01:19:02 +00:00 committed by GitHub
parent 80bb40b153
commit 6b6c27029b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2362,7 +2362,7 @@ var ZoteroPane = new function()
|| Zotero.Prefs.get('sync.autoSync')
|| Zotero.Libraries.getAll()
.every(library => !library.syncable
|| library.lastSync.getTime() > Date.now() - 1000 * sevenDays)) {
|| library.lastSync?.getTime() > Date.now() - 1000 * sevenDays)) {
return;
}