Skip to content

Commit

Permalink
fix: broken history items index when items reset (#10312)
Browse files Browse the repository at this point in the history
  • Loading branch information
lostintime authored and satya164 committed Nov 27, 2022
1 parent a689580 commit 2ecbeca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/native/src/useLinking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const createMemoryHistory = () => {
// - This is the first time any state modifications are done
// So we need to push the entry as there's nothing to replace
items = [{ path, state, id }];
index = 0;
} else {
items[index] = { path, state, id };
}
Expand Down

0 comments on commit 2ecbeca

Please sign in to comment.