From 4056283fd50ac89cdaaca482ea78a0146028787b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Jul 2017 19:47:08 -0400 Subject: [PATCH] always return array --- src/topics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/topics.js b/src/topics.js index 81bfccefc2..8dd5df0c13 100644 --- a/src/topics.js +++ b/src/topics.js @@ -329,5 +329,7 @@ Topics.search = function (tid, term, callback) { plugins.fireHook('filter:topic.search', { tid: tid, term: term, - }, callback); + }, function (err, pids) { + callback(err, Array.isArray(pids) ? pids : []); + }); };