From 48ad6dcb9924d1bdea6d0999d4e4122f39596c63 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 9 Jun 2022 18:32:14 -0500 Subject: [PATCH] Fix error if New Collection prompt is canceled --- chrome/content/zotero/zoteroPane.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 1985ff26e4..b6aaf3824d 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3498,6 +3498,9 @@ var ZoteroPane = new function() throw new Error('collection must be null if createNew is true'); } let id = await this.newCollection(); + if (!id) { + return; + } collection = Zotero.Collections.get(id); }