From 44851f97ac59923a95627cfd0fb19a0b9fbd2c91 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 17 Jul 2017 14:51:12 -0400 Subject: [PATCH] added logic for hiding logo if none is set, preventing crash on startup if no logo is set --- src/emailer.js | 2 +- src/views/emails/partials/header.tpl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/emailer.js b/src/emailer.js index 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.tpl index 100c38dd23..61867b16d3 100644 --- a/src/views/emails/partials/header.tpl +++ b/src/views/emails/partials/header.tpl @@ -172,7 +172,11 @@
+ {site_title} + +   +