From e2c9c2fe75ec08958c35210db88e7ac7225af57c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 8 Jul 2025 16:30:56 -0400 Subject: [PATCH] Asyncify advancedSearch.js --- chrome/content/zotero/advancedSearch.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/advancedSearch.js b/chrome/content/zotero/advancedSearch.js index 77a4b94d36..2ad68bbefb 100644 --- a/chrome/content/zotero/advancedSearch.js +++ b/chrome/content/zotero/advancedSearch.js @@ -28,7 +28,7 @@ import ItemTree from 'zotero/itemTree'; import { COLUMNS } from 'zotero/itemTreeColumns'; -var ZoteroAdvancedSearch = new function() { +var ZoteroAdvancedSearch = new function () { this.onLoad = onLoad; this.search = search; this.clear = clear; @@ -128,14 +128,14 @@ var ZoteroAdvancedSearch = new function() { } - this.save = Zotero.Promise.coroutine(function* () { + this.save = async function () { _searchBox.updateSearch(); var promptService = Services.prompt; var libraryID = _searchBox.search.libraryID; - var searches = yield Zotero.Searches.getAll(libraryID) + var searches = await Zotero.Searches.getAll(libraryID); var prefix = Zotero.getString('pane.collections.untitled'); var name = Zotero.Utilities.Internal.getNextName( prefix, @@ -157,10 +157,10 @@ var ZoteroAdvancedSearch = new function() { var s = _searchBox.search.clone(); s.name = name.value; - yield s.saveTx(); + await s.saveTx(); window.close(); - }); + }; this.onLibraryChange = function (libraryID) {