From e175c467cc2914e44870807f43947f3905ebb941 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Tue, 6 Oct 2020 12:08:41 -0400 Subject: [PATCH] DEV: Do not render header in wizard preview when logo is missing (#10835) This can happen if a plugin skips the logo step of the wizard. --- app/assets/javascripts/wizard/components/font-preview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/wizard/components/font-preview.js b/app/assets/javascripts/wizard/components/font-preview.js index fef9fa56d4d..99d42a5212b 100644 --- a/app/assets/javascripts/wizard/components/font-preview.js +++ b/app/assets/javascripts/wizard/components/font-preview.js @@ -34,7 +34,9 @@ export default createPreviewComponent(659, 320, { paint({ ctx, colors, font, headingFont, width, height }) { const headerHeight = height * 0.3; - this.drawFullHeader(colors, headingFont, this.logo); + if (this.logo) { + this.drawFullHeader(colors, headingFont, this.logo); + } const margin = width * 0.04; const avatarSize = height * 0.2;