ui: fixing resource success when mapped from timing messages

This commit is contained in:
nick-delirium 2024-12-05 17:20:45 +01:00
parent 5180ad8717
commit 27e94fed35
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -115,7 +115,8 @@ export const Resource = (resource: IResource) => ({
export function getResourceFromResourceTiming(msg: ResourceTiming, sessStart: number) {
const success = msg.duration > 0 // might be duration=0 when cached
// duration might be duration=0 when cached
const success = msg.duration > 0 || msg.encodedBodySize > 0 || msg.transferredSize > 0
const type = getResourceType(msg.initiator, msg.url)
return Resource({
...msg,