From 4b7e13d0601d949baaa7804cb104f37097f86cb4 Mon Sep 17 00:00:00 2001 From: Huckleberry Ginesta Date: Mon, 10 Mar 2025 11:53:48 -0600 Subject: [PATCH] fix: fix references to the window object --- stories/useStateWithHistory.story.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stories/useStateWithHistory.story.tsx b/stories/useStateWithHistory.story.tsx index 0549350816..1ce477f8d1 100644 --- a/stories/useStateWithHistory.story.tsx +++ b/stories/useStateWithHistory.story.tsx @@ -24,7 +24,7 @@ const Demo = () => { return; } - window.history.back(stepSize); + history.back(stepSize); }, [history, stepSize] ); @@ -35,7 +35,7 @@ const Demo = () => { return; } - window.history.forward(stepSize); + history.forward(stepSize); }, [history, stepSize] ); @@ -60,12 +60,12 @@ const Demo = () => { Current state: {state}
-   Step size:  @@ -76,7 +76,7 @@ const Demo = () => {
Current history
') .replace(/ /g, ' '), }}