diff options
Diffstat (limited to '')
-rw-r--r-- | lib/models/note.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/models/note.js b/lib/models/note.js index 3577d401..81013047 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -208,7 +208,8 @@ module.exports = function (sequelize, DataTypes) { } catch (err) { //na } - if (meta && meta.title && (typeof meta.title == "string" || typeof meta.title == "number")) { + if (!meta) meta = {}; + if (meta.title && (typeof meta.title == "string" || typeof meta.title == "number")) { title = meta.title; } else { var $ = cheerio.load(md.render(body)); |