added logic for hiding logo if none is set, preventing crash on startup if no logo is set

v1.18.x
Julian Lam 8 years ago
parent d9ace1723c
commit 44851f97ac

@ -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'],
},

@ -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 -->
&nbsp;
<!-- ENDIF logo.src -->
</td>
</tr>
</table>

Loading…
Cancel
Save