Skip to content

Node.js based forum software built for the modern web

possible fix for #1688

barisusaklicd5c24efe378
diff --git a/src/topics.js b/src/topics.js
index c0db6b4abd..4ee8a5909f 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -297,7 +297,7 @@ var async = require('async'),
if (err) {
return next(err);
}
- if (!Array.isArray(postData) || !postData.length) {
+ if (!Array.isArray(postData) || !postData.length || !postData[0]) {
return next(null, []);
}
postData[0].index = 0;