bitabase-gateway
Advanced tools
Comparing version 1.5.1 to 1.5.4
@@ -35,3 +35,6 @@ const callarest = require('callarest'); | ||
const managerUrl = selectRandomItemFromArray(config.managers); | ||
const managerUrl = selectRandomItemFromArray(config.managers || []); | ||
if (!managerUrl) { | ||
return console.log('usageCollection could not send data as no managers exist'); | ||
} | ||
@@ -38,0 +41,0 @@ callarest({ |
function selectRandomItemFromArray (array) { | ||
if (!array || array.length === 0) { | ||
return; | ||
} | ||
return array[Math.floor(Math.random() * array.length)]; | ||
@@ -3,0 +6,0 @@ } |
{ | ||
"name": "bitabase-gateway", | ||
"version": "1.5.1", | ||
"version": "1.5.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,3 +11,3 @@ if (process.env.NODE_ENV === 'development') { | ||
const setupUsageCollector = require('./controllers/setupUsageCollector'); | ||
const setupServerSyncer = require('./controllers/setupServerSyncer'); | ||
const setupServerSyncer = require('./modules/setupServerSyncer'); | ||
@@ -28,3 +28,3 @@ function createServer (config = {}) { | ||
const usageCollector = setupUsageCollector(config); | ||
const serverSyncer = setupServerSyncer(config); | ||
const serverSyncer = setupServerSyncer(config, 'gateway'); | ||
@@ -31,0 +31,0 @@ let server; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77435
1083