From 4e0ce9ac8738642a7a93c564b30d36b38a2b64b1 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Wed, 28 Jul 2021 16:11:44 -0700 Subject: [PATCH] cherry-pick(1.13): fix(trace-viewer): can't read object type (#7802) (#7892) --- 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')