Correctly avoid labelling 'work' as a command

This commit is contained in:
Andrew Stewart 2014-08-07 14:00:30 -07:00
parent 7a481f6767
commit bad414be39
1 changed files with 3 additions and 3 deletions

View File

@ -100,10 +100,10 @@ var Robot = module.exports = function Robot(opts) {
if (reserved.indexOf(n) < 0) {
this[n] = opt;
}
if (opts.commands == null && typeof(opt) === 'function') {
this.commands[n] = opt;
if (opts.commands == null && typeof(opt) === 'function') {
this.commands[n] = opt;
}
}
}