cherry-pick(1.13): fix(trace-viewer): can't read object type (#7802) (#7892)

This commit is contained in:
Dmitry Gozman 2021-07-28 16:11:44 -07:00 committed by GitHub
parent d4b295d481
commit 4e0ce9ac87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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')