Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setRouterState(nextState, () => {
if (nextLocation.hash) {
scrollToFragment();
} else if (options.scrollToTop) {
win.scrollTo(0, 0);
} else if (scrollRestorer.getSavedScroll()) {
scrollRestorer.restoreScroll();
}
if (onFinish) onFinish();
_invokeRouteChangeEndCallbacks(nextLocation.pathname);
});
});