Skip to content

Commit 7b89576

Browse files
nlfruyadorno
authored andcommitted
fix empty scripts
PR-URL: #2174 Credit: @nlf Close: #2174 Reviewed-by: @ruyadorno
1 parent e9b44d2 commit 7b89576

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/run-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const runScript = async (args) => {
4646

4747
pkg.scripts = scripts
4848

49-
if (!scripts[event] && !(event === 'start' && await isServerPackage(path))) {
49+
if (!Object.prototype.hasOwnProperty.call(scripts, event) && !(event === 'start' && await isServerPackage(path))) {
5050
if (npm.config.get('if-present'))
5151
return
5252

0 commit comments

Comments
 (0)