Fix undefined error when new collection title is empty

This commit is contained in:
Abe Jellinek 2022-03-11 13:08:00 -08:00
parent 78e1e8593a
commit c9ccd758bc

View file

@ -956,14 +956,12 @@ var ZoteroPane = new function()
Zotero.getString('pane.collections.newCollection'), Zotero.getString('pane.collections.newCollection'),
Zotero.getString('pane.collections.name'), newName, "", {}); Zotero.getString('pane.collections.name'), newName, "", {});
if (!result) if (!result) {
{
return; return;
} }
if (!newName.value) if (!newName.value) {
{ newName.value = name;
newName.value = untitled;
} }
var collection = new Zotero.Collection; var collection = new Zotero.Collection;