diff --git a/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx b/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx index ee4641a4eb..bc34eb9c8d 100644 --- a/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx +++ b/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx @@ -31,7 +31,7 @@ export const ProjectSelect = ({ }: ProjectSelectProps) => { const classes = useStyles(); - const projectOptions = [{ id: 'all' } as Project, ...projects] + const projectOptions = projects .filter(p => p.id) .sort((a, b) => (a.id as string).localeCompare(b.id as string)); @@ -57,7 +57,7 @@ export const ProjectSelect = ({ onChange={handleOnChange} data-testid="project-filter-select" > - {projectOptions.map(proj => ( + {[{ id: 'all' }, ...projectOptions].map(proj => (