From d22580cec00adcece95c186a9d01acb7b4983f98 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Thu, 4 Jun 2020 17:52:30 +0500 Subject: [PATCH] Fix removing background --- server/api/helpers/update-project.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/api/helpers/update-project.js b/server/api/helpers/update-project.js index d98fb4c9..b29122b1 100644 --- a/server/api/helpers/update-project.js +++ b/server/api/helpers/update-project.js @@ -11,7 +11,9 @@ module.exports = { type: 'json', custom: (value) => _.isPlainObject(value) && - (_.isUndefined(value.background) || _.isPlainObject(value.background)) && + (_.isUndefined(value.background) || + _.isNull(value.background) || + _.isPlainObject(value.background)) && (_.isUndefined(value.backgroundImage) || _.isNull(value.backgroundImage)), required: true, },