diff --git a/src/common.js b/src/common.js index d65654e3..0ec1f813 100644 --- a/src/common.js +++ b/src/common.js @@ -478,7 +478,7 @@ function _register(name, implementation, wrapOptions) { // If an option isn't specified, use the default wrapOptions = Object.assign({}, DEFAULT_WRAP_OPTIONS, wrapOptions); - if (shell[name]) { + if (shell.hasOwnProperty(name)) { throw new Error('Command `' + name + '` already exists'); }