From 098111ba5b9ef820b900bc3c6912deed0ca2f9ec Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 29 Oct 2015 11:45:28 -0400 Subject: [PATCH] Fixes bug where if post edit was called without a title, NodeBB would crash --- src/posts/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {