useHistory fix

This commit is contained in:
Martti Malmi 2023-08-25 16:33:16 +03:00
parent fb05dd2d8c
commit 1d6b7d2ead

View File

@ -19,6 +19,7 @@ function useHistoryState(initialValue, key) {
useEffect(() => {
if (state !== latestValue.current) {
throttledSetHistoryState.current(state);
latestValue.current = state;
}
// Cleanup logic