mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
Fix meta might be null issue
This commit is contained in:
parent
3bcb36b46c
commit
9bf7b92707
2 changed files with 5 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue