Skip to content

Commit

Permalink
Fixes #236
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermcginnis committed Sep 19, 2023
1 parent f2794aa commit 9ba3faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const useHistoryStateReducer = (state, action) => {
};
} else if (action.type === "CLEAR") {
return {
...initialState,
...initialUseHistoryStateState,

This comment has been minimized.

Copy link
@tylermcginnis

tylermcginnis Sep 20, 2023

Author Collaborator

clear is "a function to clear the state history and reset the state." The point is to lose the initial state and reset past and future back to empty arrays. Keeping state around wouldn't do that.

present: action.initialPresent,
};
} else {
Expand Down

0 comments on commit 9ba3faf

Please sign in to comment.