diff --git a/lib/instance.js b/lib/instance.js index f4f482ad..a3ce1887 100644 --- a/lib/instance.js +++ b/lib/instance.js @@ -166,9 +166,7 @@ function setInstance(host, callback) { function addInstance(host, alias) { // get the persisted list of instances var instances = getConfiguredInstances(); - if ( !Array.isArray(instances) ) { - instances = []; - } + // search for a duplicate (by host only) var instanceDuplicates = instances.filter(function(i) { return ( i.host === host );