Skip to content

Commit

Permalink
πŸ‘Œ clearer condition
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitZugmeyer committed Apr 4, 2024
1 parent 62efcfa commit 76ac2e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/rum-core/src/domain/resource/resourceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ export function toValidEntry(entry: RumPerformanceResourceTiming) {
entry.responseEnd
)

const areRedirectionTimingsInOrder =
!hasRedirection(entry) || areInOrder(entry.startTime, entry.redirectStart, entry.redirectEnd, entry.fetchStart)
const areRedirectionTimingsInOrder = hasRedirection(entry)
? areInOrder(entry.startTime, entry.redirectStart, entry.redirectEnd, entry.fetchStart)
: true

if (areCommonTimingsInOrder && areRedirectionTimingsInOrder) {
return entry
Expand Down

0 comments on commit 76ac2e2

Please sign in to comment.