From aa80c8cbdd0bc4b68a35a3c0b01857c7669c3dbd Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 7 Nov 2016 11:06:32 -0500 Subject: [PATCH] FIX: Support optional logos when previewing the wizard --- app/assets/javascripts/wizard/lib/preview.js.es6 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/wizard/lib/preview.js.es6 b/app/assets/javascripts/wizard/lib/preview.js.es6 index a5e8371eb29..17cfe560ff5 100644 --- a/app/assets/javascripts/wizard/lib/preview.js.es6 +++ b/app/assets/javascripts/wizard/lib/preview.js.es6 @@ -126,8 +126,11 @@ export function createPreviewComponent(width, height, obj) { // Logo const headerMargin = headerHeight * 0.2; const logoHeight = headerHeight - (headerMargin * 2); - const logoWidth = (logoHeight / this.logo.height) * this.logo.width; - this.scaleImage(this.logo, headerMargin, headerMargin, logoWidth, logoHeight); + + if (this.logo) { + const logoWidth = (logoHeight / this.logo.height) * this.logo.width; + this.scaleImage(this.logo, headerMargin, headerMargin, logoWidth, logoHeight); + } // Top right menu this.scaleImage(this.avatar, width - avatarSize - headerMargin, headerMargin, avatarSize, avatarSize);