From c9ccd758bc55fe84f2fed4dc73accbee0762757f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 11 Mar 2022 13:08:00 -0800 Subject: [PATCH] Fix undefined error when new collection title is empty --- chrome/content/zotero/zoteroPane.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 01b5e54f9b..7aa4cabe88 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -956,14 +956,12 @@ var ZoteroPane = new function() Zotero.getString('pane.collections.newCollection'), Zotero.getString('pane.collections.name'), newName, "", {}); - if (!result) - { + if (!result) { return; } - if (!newName.value) - { - newName.value = untitled; + if (!newName.value) { + newName.value = name; } var collection = new Zotero.Collection;