From 57ab92b5b9cddf1d45d6ae95bb8ecefd3df8be26 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 023106c6d0..a4e1c56af5 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3507,6 +3507,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); }