diff --git a/src/search.js b/src/search.js index 0a0d1f459c..d71430c437 100644 --- a/src/search.js +++ b/src/search.js @@ -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 []; }