Skip to content

Commit

Permalink
fix(patches): fix patches issue with disabled autoArchive (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib authored Apr 12, 2024
1 parent a119987 commit 64536d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-travel",
"version": "1.0.3",
"version": "1.1.0",
"description": "A React hook for state time travel with undo, redo, reset and archive functionalities.",
"main": "dist/index.cjs.js",
"unpkg": "dist/index.umd.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const useTravel = <S, F extends boolean, A extends boolean>(
});
}
},
[state, position, setTempPatches]
[allPatches, state, position, setTempPatches]
);
const archive = () => {
if (autoArchive) {
Expand Down

0 comments on commit 64536d7

Please sign in to comment.