Skip to content

Commit

Permalink
Merge pull request #5822 from andrepadez/development
Browse files Browse the repository at this point in the history
replaced util.isArray for native Array.isArray (3 instances)
  • Loading branch information
Unitech authored May 23, 2024
2 parents f9d2d63 + d321d0d commit 9362fd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ class API {
if (!opts) opts = {};

var that = this;
if (util.isArray(opts.watch) && opts.watch.length === 0)
if (Array.isArray(opts.watch) && opts.watch.length === 0)
opts.watch = (opts.rawArgs ? !!~opts.rawArgs.indexOf('--watch') : !!~process.argv.indexOf('--watch')) || false;

if (Common.isConfigFile(cmd) || (typeof(cmd) === 'object')) {
Expand Down Expand Up @@ -1611,7 +1611,7 @@ class API {

delete appConf.exec_mode;

if (util.isArray(appConf.watch) && appConf.watch.length === 0) {
if (Array.isArray(appConf.watch) && appConf.watch.length === 0) {
if (!~opts.rawArgs.indexOf('--watch'))
delete appConf.watch
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function ClusterMode(God) {

var watch = pm2_env.watch

if(typeof watch == 'boolean' || util.isArray(watch) && watch.length === 0)
if(typeof watch == 'boolean' || Array.isArray(watch) && watch.length === 0)
watch = pm2_env.pm_cwd;

log('Watching %s', watch);
Expand Down

0 comments on commit 9362fd7

Please sign in to comment.