From 10a8448c6a9cdde0ad8cadf3dc250de159eacbf2 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 2 Jan 2017 11:13:41 +0800 Subject: [PATCH] Fix yaml metadata description not able to show --- lib/response.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/response.js b/lib/response.js index f591d5ed0..54e2a3378 100755 --- a/lib/response.js +++ b/lib/response.js @@ -209,7 +209,7 @@ function showPublishNote(req, res, next) { var origin = config.serverurl; var data = { title: title, - description: meta.description || markdown ? models.Note.generateDescription(markdown) : null, + description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null), viewcount: note.viewcount, createtime: createtime, updatetime: updatetime, @@ -281,7 +281,7 @@ function actionInfo(req, res, note) { var title = models.Note.decodeTitle(note.title); var data = { title: meta.title || title, - description: meta.description || markdown ? models.Note.generateDescription(markdown) : null, + description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null), viewcount: note.viewcount, createtime: createtime, updatetime: updatetime @@ -597,7 +597,7 @@ function showPublishSlide(req, res, next) { var origin = config.serverurl; var data = { title: title, - description: meta.description || markdown ? models.Note.generateDescription(markdown) : null, + description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null), viewcount: note.viewcount, createtime: createtime, updatetime: updatetime,