Skip to content

Node.js based forum software built for the modern web

Fixes bug where if post edit was called without a title, NodeBB would crash

Julian Lam098111ba5b9e
diff --git a/src/posts/edit.js b/src/posts/edit.js
index 2eca8a8328..ea7686fb20 100644
--- a/src/posts/edit.js
+++ b/src/posts/edit.js
@@ -86,7 +86,7 @@ module.exports = function(Posts) {
function editMainPost(data, postData, callback) {
var tid = postData.tid;
- var title = data.title.trim();
+ var title = data.title ? data.title.trim() : '';
async.parallel({
topic: function(next) {