Fix error if New Collection prompt is canceled

This commit is contained in:
Abe Jellinek 2022-06-09 18:32:14 -05:00 committed by Dan Stillman
parent 3fb9e2162e
commit 48ad6dcb99

View file

@ -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);
}