Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amortemousque committed May 12, 2023
1 parent b3cc4d6 commit 6f8127f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/rum-core/src/domain/contexts/pageStateHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ export function startPageStateHistory(
}

const pageStateServerEntries = []
// limit the number of entries to return
const limit = Math.max(0, pageStateEntries.length - maxPageStateEntriesSelectable)

// loop page state entries backward to return the selected ones in desc order
for (let index = pageStateEntries.length - 1; index >= limit; index--) {
const pageState = pageStateEntries[index]
// compute the start time relative to the event start time (ex: to be relative to the view start time)
Expand Down

0 comments on commit 6f8127f

Please sign in to comment.