summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2017-01-02 11:13:41 +0800
committerWu Cheng-Han2017-01-02 11:13:41 +0800
commit10a8448c6a9cdde0ad8cadf3dc250de159eacbf2 (patch)
treedc19e58168dcf1fd45480e70429dfe9758f90e0c
parentdb0ea715c61c1b82794403cd045f6ccac5aa66c9 (diff)
Fix yaml metadata description not able to show
Diffstat (limited to '')
-rwxr-xr-xlib/response.js6
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,