Skip to content

Node.js based forum software built for the modern web

fixed post content

Baris Usakli2a3ef2408f78
diff --git a/src/posts.js b/src/posts.js
index 781e38a992..72aa0112a7 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -48,7 +48,7 @@ var RDB = require('./redis.js'),
for (var i=0, ii=content.length; i<ii; i++) {
posts.push({
'pid' : pid[i],
- 'content' : marked(content[i]),
+ 'content' : marked(content[i] || ''),
'uid' : uid[i],
'userName' : userNames[i] || 'anonymous',
'gravatar' : gravatars[i],
diff --git a/src/topics.js b/src/topics.js
index e7bf01bb33..fe474b65ed 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -150,7 +150,7 @@ var RDB = require('./redis.js'),
RDB.set('topic:slug:' + slug + ':tid', tid);
// Posts
- posts.create(uid, content, function(pid) {
+ posts.create(uid, tid, content, function(pid) {
RDB.lpush('tid:' + tid + ':posts', pid);
});