fix error on "showconfig" with no paremeters (now shows root config)

This commit is contained in:
John Maguire 2013-03-21 04:42:03 -04:00
parent 8d8cf2bd9a
commit ded2f09e87

View File

@ -26,7 +26,7 @@ var commands = function(dbot) {
} }
var currentOption; var currentOption;
if(configKey.length != 1) { if(configKey && configKey.length != 1) {
configKey = _.last(configKey); configKey = _.last(configKey);
if(_.has(userConfigPath, configKey) && !_.isUndefined(userConfigPath[configKey])) { if(_.has(userConfigPath, configKey) && !_.isUndefined(userConfigPath[configKey])) {
currentOption = userConfigPath[configKey]; currentOption = userConfigPath[configKey];