Skip to content

Node.js based forum software built for the modern web

another crash fix

barisusakli73bef8168f05
diff --git a/src/topics.js b/src/topics.js
index c34746d477..9bde8159be 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -272,7 +272,9 @@ var async = require('async'),
}
start = parseInt(start, 10);
for(var i=0; i<posts.length; ++i) {
- posts[i].index = start + i;
+ if (posts[i]) {
+ posts[i].index = start + i;
+ }
}
if (posts[0]) {
posts[0].index = 0;