Skip to content

Commit

Permalink
fix(system): don't use Array.includes b/c node 4 doesn't have it
Browse files Browse the repository at this point in the history
  • Loading branch information
acburdine committed Jun 27, 2017
1 parent e4bfc7c commit 9023971
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const os = require('os');
const path = require('path');
const findKey = require('lodash/findKey');
const uniqueId = require('lodash/uniqueId');
const includes = require('lodash/includes');

const Config = require('./utils/config');
const Instance = require('./instance');
Expand Down Expand Up @@ -71,7 +72,7 @@ class System {

let currentName = instance.name;
let existingNames = Object.keys(instances);
while (existingNames.includes(currentName)) {
while (includes(existingNames, currentName)) {
currentName = uniqueId(currentName.match(/\-\d+$/) ? currentName.replace(/-\d+$/, '-') : `${ currentName }-`);
}

Expand Down

0 comments on commit 9023971

Please sign in to comment.