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.
This commit is contained in:
Penar Musaraj 2020-10-06 12:08:41 -04:00 committed by GitHub
parent c0350dc362
commit e175c467cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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;