From 6b6c27029b01841f0a8d47a6b688e6320cd3cb34 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Sat, 12 Mar 2022 01:19:02 +0000 Subject: [PATCH] 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. --- chrome/content/zotero/zoteroPane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 8ec2d27ef0..5a667bc648 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -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; }