Skip to content

Commit daf9431

Browse files
committed
fix(replay): resetting navigation needs to clear
1 parent f411b93 commit daf9431

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

replay-app/backend/models/Window.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default class Window {
3333

3434
private readonly navHistory: { location?: IWindowLocation; replayMeta?: IReplayMeta }[] = [];
3535

36-
private navCursor: number;
36+
private navCursor = -1;
3737

3838
private _fullscreen = false;
3939
private isReady: Promise<void>;
@@ -218,6 +218,7 @@ export default class Window {
218218
if (historyIdx !== undefined) {
219219
this.navCursor = historyIdx;
220220
} else {
221+
this.navHistory.length = this.navCursor+1;
221222
this.navCursor = this.navHistory.length;
222223
this.navHistory.push(history);
223224
}

0 commit comments

Comments
 (0)