From 4bc284b06e0bdf9b4e42c317e0c5826fd43acd0d Mon Sep 17 00:00:00 2001 From: Regev Brody Date: Wed, 24 Jun 2020 01:26:29 +0300 Subject: [PATCH] fix: page schema validation for extra field (#2097) --- server/models/pages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/models/pages.js b/server/models/pages.js index 85dabacd..5689d6d2 100644 --- a/server/models/pages.js +++ b/server/models/pages.js @@ -856,8 +856,8 @@ module.exports = class Page extends Model { creatorName: page.creatorName, description: page.description, extra: { - css: page.extra ? page.extra.css : '', - js: page.extra ? page.extra.js : '' + css: _.get(page, 'extra.css', ''), + js: _.get(page, 'extra.js', '') }, isPrivate: page.isPrivate === 1 || page.isPrivate === true, isPublished: page.isPublished === 1 || page.isPublished === true,