We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a70a6f5 commit e6594b6Copy full SHA for e6594b6
packages/router/src/history/memory.ts
@@ -26,14 +26,11 @@ export function createMemoryHistory(base: string = ''): RouterHistory {
26
27
function setLocation(location: HistoryLocation) {
28
position++
29
- if (position === queue.length) {
30
- // we are at the end, we can simply append a new entry
31
- queue.push(location)
32
- } else {
+ if (position !== queue.length) {
33
// we are in the middle, we remove everything from here in the queue
34
queue.splice(position)
35
36
}
+ queue.push(location)
37
38
39
function triggerListeners(
0 commit comments