Skip to content

Commit

Permalink
411709: Guard things a little better
Browse files Browse the repository at this point in the history
  • Loading branch information
feedmypixel committed Jan 10, 2025
1 parent dcc9884 commit eec7e26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
7 changes: 3 additions & 4 deletions src/server/services/list/helpers/build-services-table-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit eec7e26

Please sign in to comment.