Skip to content

Commit

Permalink
fix(deployment): preview templates type
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Feb 25, 2025
1 parent a0520db commit 72f2cdd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const TemplateList: React.FunctionComponent<Props> = ({ onChangeGitProvid

useEffect(() => {
if (templates) {
const _previewTemplates = previewTemplateIds.map(id => templates.find(template => template.id === id)).filter(x => !!x);
const _previewTemplates = previewTemplateIds
.map(id => templates.find(template => template.id === id))
.filter((template): template is TemplateOutputSummaryWithCategory => template !== undefined);
setPreviewTemplates(_previewTemplates);
}
}, [templates]);
Expand Down

0 comments on commit 72f2cdd

Please sign in to comment.