Node.js based forum software built for the modern web
added logic for hiding logo if none is set, preventing crash on startup if no logo is set
Julian Lam44851f97ac59
diff --git a/src/emailer.js b/src/emailer.jsindex 947f5b35a7..853149862f 100644--- a/src/emailer.js+++ b/src/emailer.js@@ -35,7 +35,7 @@ Emailer.registerApp = function (expressApp) {url: nconf.get('url'),site_title: meta.config.title || 'NodeBB',logo: {- src: nconf.get('url') + meta.config['brand:logo'].replace('.png', '-x50.png'),+ src: meta.config['brand:logo'] ? nconf.get('url') + meta.config['brand:logo'].replace('.png', '-x50.png') : null,height: meta.config['brand:emailLogo:height'],width: meta.config['brand:emailLogo:width'],},diff --git a/src/views/emails/partials/header.tpl b/src/views/emails/partials/header.tplindex 100c38dd23..61867b16d3 100644--- a/src/views/emails/partials/header.tpl+++ b/src/views/emails/partials/header.tpl@@ -172,7 +172,11 @@<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px;"><tr><td style="padding: 20px 0; text-align: center">+ <!-- IF logo.src --><img src="{logo.src}" height="{logo.height}" width="{logo.width}" alt="{site_title}" border="0" style="height: {logo.height}px; width: {logo.width}px; background: #222222; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">+ <!-- ELSE -->+ + <!-- ENDIF logo.src --></td></tr></table>