From ded2f09e874053c12906da4bbe9912d108009257 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 21 Mar 2013 04:42:03 -0400 Subject: [PATCH] fix error on "showconfig" with no paremeters (now shows root config) --- modules/admin/commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin/commands.js b/modules/admin/commands.js index c648760..c2e6778 100644 --- a/modules/admin/commands.js +++ b/modules/admin/commands.js @@ -23,10 +23,10 @@ var commands = function(dbot) { return false; } } - } + } var currentOption; - if(configKey.length != 1) { + if(configKey && configKey.length != 1) { configKey = _.last(configKey); if(_.has(userConfigPath, configKey) && !_.isUndefined(userConfigPath[configKey])) { currentOption = userConfigPath[configKey];