Advanced Search: Make sure items are loaded (#2743)

This commit is contained in:
Abe Jellinek 2022-08-06 15:00:33 -04:00 committed by Dan Stillman
parent 72d4cdd3a3
commit 678a6101b3

View file

@ -96,6 +96,8 @@ var ZoteroAdvancedSearch = new function() {
ref: _searchBox.search, ref: _searchBox.search,
isSearchMode: () => true, isSearchMode: () => true,
getItems: async function () { getItems: async function () {
await Zotero.Libraries.get(_libraryID).waitForDataLoad('item');
var search = _searchBox.search.clone(); var search = _searchBox.search.clone();
search.libraryID = _libraryID; search.libraryID = _libraryID;
var ids = await search.search(); var ids = await search.search();