Skip to content

Commit e6f3325

Browse files
committed
fix(memory): correct splice limit to match maxNavigationSaved semantics
1 parent d88f40d commit e6f3325

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/PageCollector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class PageCollector<T> {
159159
}
160160
// Add the latest navigation first
161161
navigations.unshift([]);
162-
navigations.splice(this.maxNavigationSaved);
162+
navigations.splice(this.maxNavigationSaved + 1);
163163
}
164164

165165
protected cleanupPageDestroyed(page: Page) {
@@ -409,6 +409,6 @@ export class NetworkCollector extends PageCollector<HTTPRequest> {
409409
} else {
410410
navigations.unshift([]);
411411
}
412-
navigations.splice(this.maxNavigationSaved);
412+
navigations.splice(this.maxNavigationSaved + 1);
413413
}
414414
}

0 commit comments

Comments
 (0)