From a20e20cdae627e64d0dc9abfd935b3993f0bacd8 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Thu, 22 Jul 2021 13:35:11 -0700 Subject: [PATCH] fix(trace-viewer): can't read object type (#7802) --- src/web/traceViewer/ui/modelUtil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/traceViewer/ui/modelUtil.ts b/src/web/traceViewer/ui/modelUtil.ts index 2153985199..f2c8a41274 100644 --- a/src/web/traceViewer/ui/modelUtil.ts +++ b/src/web/traceViewer/ui/modelUtil.ts @@ -59,7 +59,7 @@ export function stats(action: ActionTraceEvent): { errors: number, warnings: num for (const event of eventsForAction(action)) { if (event.metadata.method === 'console') { const { guid } = event.metadata.params.message; - const type = p.objects[guid].type; + const type = p.objects[guid]?.type; if (type === 'warning') ++warnings; else if (type === 'error')