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,12 +100,12 @@ 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 (typeof opts.commands === 'function') {
var result = opts.commands.call(this, this);