From 885eec79c303176436ec7b976fb90512965929c5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 7 Nov 2013 15:54:19 -0500 Subject: [PATCH] ninjafix for bad conditional --- src/routes/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api.js b/src/routes/api.js index f52b43d273..5b4e1c5f10 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -52,7 +52,7 @@ var user = require('./../user.js'), async.each(data.categories, iterator, function (err) { data.motd_class = (meta.config.show_motd === '1' || meta.config.show_motd === undefined) ? '' : ' none'; - data.motd_class += (meta.config.motd.length > 0 ? '' : ' default'); + data.motd_class += (meta.config.motd && meta.config.motd.length > 0 ? '' : ' default'); data.motd = require('marked')(meta.config.motd || "
 Get NodeBB  Fork us on Github  @dcplabs
\n\n# NodeBB v" + pkg.version + "\nWelcome to NodeBB, the discussion platform of the future."); res.json(data);