From 439b8777445124b6e2f494a32caebbe204599a30 Mon Sep 17 00:00:00 2001 From: Rish Date: Tue, 8 Dec 2020 13:27:17 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20email=20design=20setting?= =?UTF-8?q?s=20not=20opening?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes https://github.com/TryGhost/Ghost/issues/12459 - Email design settings don't open in some cases when footer html is set as null, specifically on import - Patches html cleanup to use empty string in case of null footer value --- .../koenig-editor/addon/components/koenig-basic-html-input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-basic-html-input.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-basic-html-input.js index e1eccd6323..2179729fa2 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-basic-html-input.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-basic-html-input.js @@ -48,7 +48,7 @@ export default Component.extend({ /* computed properties -------------------------------------------------- */ cleanHTML: computed('html', function () { - return cleanBasicHtml(this.html); + return cleanBasicHtml(this.html || ''); }), // merge in named options with any passed in `options` property data-bag @@ -392,7 +392,7 @@ export default Component.extend({ return ''; } - let html = firstParagraph.innerHTML; + let html = firstParagraph.innerHTML || ''; return cleanBasicHtml(html); } }