Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent redundant patching of History API methods
The previous implementation of patching the History API methods (pushState and replaceState) was causing them to increasingly nest within patched versions of themselves. To fix this, a new flag `isHistoryPatched` was introduced to prevent redundant patching. The `stopProgressOnHistoryUpdate` function now checks if the flag is already set before applying the patch. Additionally, the flag is set to `true` after the patching is done to ensure it is only applied once. Reference: TheSGJ/nextjs-toploader#68
- Loading branch information