fix: #9976, handle array or object

isekai-main
Barış Soner Uşaklı 3 years ago
parent 41e0240010
commit 9bfb6c7281

@ -45,14 +45,16 @@ async function searchInContent(data) {
async function doSearch(type, searchIn) {
if (searchIn.includes(data.searchIn)) {
return await plugins.hooks.fire('filter:search.query', {
const result = await plugins.hooks.fire('filter:search.query', {
index: type,
content: data.query,
matchWords: data.matchWords || 'all',
cid: searchCids,
uid: searchUids,
searchData: data,
ids: [],
});
return Array.isArray(result) ? result : result.ids;
}
return [];
}

Loading…
Cancel
Save