diff --git a/src/server/common/helpers/fetch/fetch-deployable-services.js b/src/server/common/helpers/fetch/fetch-deployable-services.js index 31d46689..2fa0209b 100644 --- a/src/server/common/helpers/fetch/fetch-deployable-services.js +++ b/src/server/common/helpers/fetch/fetch-deployable-services.js @@ -10,7 +10,7 @@ async function fetchDeployableServices(queryParams = {}) { qs.stringify(queryParams, { arrayFormat: 'repeat', addQueryPrefix: true }) const { data } = await fetcher(endpoint) - return data + return data ?? [] } export { fetchDeployableServices } diff --git a/src/server/services/list/helpers/build-services-table-data.js b/src/server/services/list/helpers/build-services-table-data.js index 40029c75..811cd09a 100644 --- a/src/server/services/list/helpers/build-services-table-data.js +++ b/src/server/services/list/helpers/build-services-table-data.js @@ -41,10 +41,9 @@ async function buildServicesTableData({ const { repositories } = repositoriesResponse const decorator = repositoriesDecorator(repositories) - const deployableServicesWithRepository = - deployableServices?.map(decorator) ?? [] - const inProgressServicesWithRepository = - inProgressServices?.map(decorator) ?? [] + + const deployableServicesWithRepository = deployableServices.map(decorator) + const inProgressServicesWithRepository = inProgressServices.map(decorator) // Services from Self Service Ops /status/in-progress overwrite services from Portal Backends /services const services = unionBy(