Fix missing return values in streaming (#26233)
This commit is contained in:
parent
8018d478ab
commit
879b8b69d3
1 changed files with 5 additions and 3 deletions
|
@ -798,12 +798,12 @@ const startWorker = async (workerId) => {
|
|||
const filter_results = Object.values(req.cachedFilters).reduce((results, cachedFilter) => {
|
||||
// Check the filter hasn't expired before applying:
|
||||
if (cachedFilter.expires_at !== null && cachedFilter.expires_at < now) {
|
||||
return;
|
||||
return results;
|
||||
}
|
||||
|
||||
// Just in-case JSDOM fails to find textContent in searchableContent
|
||||
if (!searchableTextContent) {
|
||||
return;
|
||||
return results;
|
||||
}
|
||||
|
||||
const keyword_matches = searchableTextContent.match(cachedFilter.regexp);
|
||||
|
@ -818,6 +818,8 @@ const startWorker = async (workerId) => {
|
|||
status_matches: null
|
||||
});
|
||||
}
|
||||
|
||||
return results;
|
||||
}, []);
|
||||
|
||||
// Send the payload + the FilterResults as the `filtered` property
|
||||
|
|
Loading…
Reference in a new issue