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

This commit is contained in:
Pavel Feldman 2021-07-22 13:35:11 -07:00 committed by GitHub
parent 03ebe21323
commit a20e20cdae
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')