Skip to content

Commit 9362fd7

Browse files
authored
Merge pull request #5822 from andrepadez/development
replaced util.isArray for native Array.isArray (3 instances)
2 parents f9d2d63 + d321d0d commit 9362fd7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/API.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class API {
322322
if (!opts) opts = {};
323323

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

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

16121612
delete appConf.exec_mode;
16131613

1614-
if (util.isArray(appConf.watch) && appConf.watch.length === 0) {
1614+
if (Array.isArray(appConf.watch) && appConf.watch.length === 0) {
16151615
if (!~opts.rawArgs.indexOf('--watch'))
16161616
delete appConf.watch
16171617
}

lib/Watcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = function ClusterMode(God) {
2929

3030
var watch = pm2_env.watch
3131

32-
if(typeof watch == 'boolean' || util.isArray(watch) && watch.length === 0)
32+
if(typeof watch == 'boolean' || Array.isArray(watch) && watch.length === 0)
3333
watch = pm2_env.pm_cwd;
3434

3535
log('Watching %s', watch);

0 commit comments

Comments
 (0)