Skip to content

Commit fd961d6

Browse files
committed
fix: defensive check on accessing cmd.args
1 parent fa64cdc commit fd961d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/monitor/run.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function run(options) {
8686
if (
8787
// this is a hack to avoid forking if there's a node argument being passed
8888
// it's a short term fix, and I'm not 100% sure that `fork` is the right way
89-
cmd.args[0].indexOf('-') === -1 &&
89+
(cmd.args[0] || '').indexOf('-') === -1 &&
9090
executable === 'node' &&
9191
utils.version.major > 4
9292
) {

0 commit comments

Comments
 (0)