mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: handle undefined data.query
This commit is contained in:
@@ -58,7 +58,7 @@ async function searchInContent(data) {
|
||||
}
|
||||
let pids = [];
|
||||
let tids = [];
|
||||
const inTopic = data.query.match(/^in:topic-([\d]+) /);
|
||||
const inTopic = String(data.query || '').match(/^in:topic-([\d]+) /);
|
||||
if (inTopic) {
|
||||
const tid = inTopic[1];
|
||||
const cleanedTerm = data.query.replace(inTopic[0], '');
|
||||
|
||||
Reference in New Issue
Block a user