Skip to content

Commit

Permalink
console: Fix fetching stats if there are no gateways
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelJankoski committed Nov 15, 2023
1 parent 1b7cd8d commit b3debe5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/webui/console/store/middleware/logics/gateways.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ const getGatewaysLogic = createRequestLogic({
const gsConfig = selectGsConfig()
const consoleGsAddress = getHostFromUrl(gsConfig.base_url)
const gatewayIds = entities.map(e => e.ids)
const gatewaysStats = await tts.Gateways.getBatchStatistics(gatewayIds)
let gatewaysStats = null
if (gatewayIds.length) {
gatewaysStats = await tts.Gateways.getBatchStatistics(gatewayIds)
}

entities = data.gateways.map(gateway => {
const gatewayServerAddress = getHostFromUrl(gateway.gateway_server_address)
Expand Down

0 comments on commit b3debe5

Please sign in to comment.