Skip to content

Instantly share code, notes, and snippets.

@CHAOWEICHIU
Created March 23, 2020 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CHAOWEICHIU/3ace7ef473c1d2a3da5429aaf01659e6 to your computer and use it in GitHub Desktop.
Save CHAOWEICHIU/3ace7ef473c1d2a3da5429aaf01659e6 to your computer and use it in GitHub Desktop.
import { createBrowserHistory } from 'history';
const history = createBrowserHistory();
const path = (/#!(\/.*)$/.exec(location.hash) || [])[1];
if (path) {
history.replace(path);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment