Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/trace-viewer/src/sw/traceLoaderBackends.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ export class ZipTraceLoaderBackend implements TraceLoaderBackend {
const entry = entries.get(entryName);
if (!entry)
return;
const writer = new zipjs.TextWriter();
const writer = new zipjs.Uint8ArrayWriter();
await entry.getData?.(writer);
return writer.getData();
return new TextDecoder().decode(writer.getData());
}

async readBlob(entryName: string): Promise<Blob | undefined> {
const entries = await this._entriesPromise;
const entry = entries.get(entryName);
if (!entry)
return;
const writer = new zipjs.BlobWriter() as zip.BlobWriter;
const writer = new zipjs.Uint8ArrayWriter();
await entry.getData!(writer);
return writer.getData();
return new Blob([writer.getData()]);
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/trace-viewer/src/ui/networkTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ const renderCell = (entry: RenderedEntry, column: ColumnName): RenderedGridCell
if (column === 'method')
return { body: entry.method };
if (column === 'status') {
const statusBody = entry.status.code > 0 ? entry.status.code : (entry.status.code === -1 ? 'Canceled' : '');
return {
body: entry.status.code > 0 ? entry.status.code : '',
body: statusBody,
title: entry.status.text
};
}
Expand Down