Skip to content

Commit

Permalink
fix(patches): fix patches issue with disabled autoArchive
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Apr 12, 2024
1 parent a119987 commit 3adabf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -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
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 3adabf3

Please sign in to comment.