Skip to content

Commit

Permalink
fix empty scripts
Browse files Browse the repository at this point in the history
PR-URL: #2174
Credit: @nlf
Close: #2174
Reviewed-by: @ruyadorno
  • Loading branch information
nlf authored and ruyadorno committed Nov 17, 2020
1 parent e9b44d2 commit 7b89576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/run-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7b89576

Please sign in to comment.