Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(trace-viewer): can't read object type (#7802)

Pavel Feldmana20e20cdae62
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')