diff options
author | Wu Cheng-Han | 2017-01-02 11:13:41 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2017-01-02 11:13:41 +0800 |
commit | 10a8448c6a9cdde0ad8cadf3dc250de159eacbf2 (patch) | |
tree | dc19e58168dcf1fd45480e70429dfe9758f90e0c | |
parent | db0ea715c61c1b82794403cd045f6ccac5aa66c9 (diff) |
Fix yaml metadata description not able to show
Diffstat (limited to '')
-rwxr-xr-x | lib/response.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/response.js b/lib/response.js index f591d5ed..54e2a337 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, |