diff --git a/package-lock.json b/package-lock.json index 3cca706bd..3ea3c3e54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "shelljs", - "version": "0.8.3", + "version": "0.8.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fcb0fb570..b52070538 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shelljs", - "version": "0.8.3", + "version": "0.8.4", "description": "Portable Unix shell commands for Node.js", "keywords": [ "shelljs", diff --git a/src/common.js b/src/common.js index 14a49fc58..64fa2fbc0 100644 --- a/src/common.js +++ b/src/common.js @@ -450,7 +450,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'); }