diff --git a/packages/trace-viewer/src/ui/annotationsTab.tsx b/packages/trace-viewer/src/ui/annotationsTab.tsx index b8438df7de..5a2a34c9f1 100644 --- a/packages/trace-viewer/src/ui/annotationsTab.tsx +++ b/packages/trace-viewer/src/ui/annotationsTab.tsx @@ -22,10 +22,10 @@ import { linkifyText } from '@web/renderUtils'; type Annotation = { type: string; description?: string; }; export const AnnotationsTab: React.FunctionComponent<{ - annotations: Annotation[] | undefined, + annotations: Annotation[], }> = ({ annotations }) => { - if (!annotations || !annotations.length) + if (!annotations.length) return ; return
diff --git a/packages/trace-viewer/src/ui/workbench.tsx b/packages/trace-viewer/src/ui/workbench.tsx index e94617925b..0a5dd226eb 100644 --- a/packages/trace-viewer/src/ui/workbench.tsx +++ b/packages/trace-viewer/src/ui/workbench.tsx @@ -230,7 +230,7 @@ export const Workbench: React.FunctionComponent<{ const annotationsTab: TabbedPaneTabModel = { id: 'annotations', title: 'Annotations', - count: annotations?.length ?? 0, + count: annotations.length, render: () => }; tabs.push(annotationsTab);