From 99b04118572a10c3fe1685b7bb6d1a5010478c55 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 16 Jan 2024 14:44:52 -0500 Subject: [PATCH] Return created collection from newCollection() Regression from fd0664bfb06409118ecaff73e064ab9c3103d823 --- chrome/content/zotero/zoteroPane.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 6a00b56d60..f3266c95cc 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1399,7 +1399,7 @@ var ZoteroPane = new function() this.newCollection = async function (parentKey = null) { if (!this.canEditLibrary()) { this.displayCannotEditLibraryMessage(); - return; + return null; } var libraryID = this.getSelectedLibraryID(); @@ -1426,7 +1426,7 @@ var ZoteroPane = new function() "_blank", "chrome,modal,centerscreen,resizable=no", io); var dataOut = io.dataOut; if (!dataOut) { - return; + return null; } if (!dataOut.name) { @@ -1437,7 +1437,7 @@ var ZoteroPane = new function() collection.libraryID = dataOut.libraryID; collection.name = dataOut.name; collection.parentID = dataOut.parentCollectionID; - await collection.saveTx(); + return collection.saveTx(); }; this.importFeedsFromOPML = async function (event) {