Skip to content

Commit 3b53593

Browse files
committed
fix: remove unnecessary use of apply in history.pushState and history.replaceState calls
1 parent 820bd33 commit 3b53593

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ const HolyLoader = ({
147147
const originalPushState = history.pushState.bind(history);
148148
history.pushState = (...args) => {
149149
stopProgress();
150-
originalPushState.apply(history, args);
150+
originalPushState(...args);
151151
};
152152

153153
// This is crucial for Next.js Link components using the 'replace' prop.
154154
const originalReplaceState = history.replaceState.bind(history);
155155
history.replaceState = (...args) => {
156156
stopProgress();
157-
originalReplaceState.apply(history, args);
157+
originalReplaceState(...args);
158158
};
159159

160160
isHistoryPatched = true;

0 commit comments

Comments
 (0)