Skip to content

Commit

Permalink
isNaN() doesn't check if the value is numeric; it only checks if it i…
Browse files Browse the repository at this point in the history
…s equal to NaN. In particular it won't catch null.
  • Loading branch information
hughescr committed Apr 17, 2015
1 parent 5c28989 commit 36fbaf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ forever.logEvents = function (monitor) {
});

monitor.on('exit:code', function (code, signal) {
forever.out.error(!isNaN(code)
forever.out.error((code !== null && code !== undefined)
? 'Forever detected script exited with code: ' + code
: 'Forever detected script was killed by signal: ' + signal);
});
Expand Down

0 comments on commit 36fbaf1

Please sign in to comment.