Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2020-11-14 01:14:52 +0300
committernlf <quitlahok@gmail.com>2020-11-14 01:14:52 +0300
commita52c43d2f420011e1d418b760e0121251757cff6 (patch)
tree2f64462e14f422ae7c98a52bf64cb8a4ce1193e3
parent555b3b20d4a52f490601ec5188844f92f69e7df0 (diff)
fix empty scriptsnlf/fix-empty-scripts
-rw-r--r--lib/run-script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/run-script.js b/lib/run-script.js
index 568a5712f..c095e6dec 100644
--- a/lib/run-script.js
+++ b/lib/run-script.js
@@ -46,7 +46,7 @@ const runScript = async (args) => {
pkg.scripts = scripts
- if (!scripts[event] && !(event === 'start' && await isServerPackage(path))) {
+ if (!Object.prototype.hasOwnProperty.call(scripts, event) && !(event === 'start' && await isServerPackage(path))) {
if (npm.config.get('if-present'))
return