From 4db15e32d11d54a3de60377637ca414901d2a2a8 Mon Sep 17 00:00:00 2001 From: Tadeas Kmenta Date: Thu, 24 Mar 2022 20:14:54 +0700 Subject: [PATCH] fix app spawning on nodes without any app running --- ZelBack/src/services/appsService.js | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ZelBack/src/services/appsService.js b/ZelBack/src/services/appsService.js index 12c68b5b0..9f7614feb 100644 --- a/ZelBack/src/services/appsService.js +++ b/ZelBack/src/services/appsService.js @@ -3564,6 +3564,9 @@ async function assignedPortsGlobalApps(appNames) { name: app, }); }); + if (!appsQuery.length) { + return []; + } const query = { $or: appsQuery, }; @@ -3603,7 +3606,7 @@ async function assignedPortsGlobalApps(appNames) { async function ensureApplicationPortsNotUsed(appSpecFormatted, globalCheckedApps) { let currentAppsPorts = await assignedPortsInstalledApps(); - if (globalCheckedApps) { + if (globalCheckedApps && globalCheckedApps.length) { const globalAppsPorts = await assignedPortsGlobalApps(globalCheckedApps); currentAppsPorts = currentAppsPorts.concat(globalAppsPorts); } diff --git a/package.json b/package.json index 433ebf53b..61acbf1cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flux", - "version": "3.13.0", + "version": "3.14.0", "description": "Flux, Your Gateway to a Decentralized World", "repository": { "type": "git",