Created
March 23, 2020 01:26
-
-
Save CHAOWEICHIU/3ace7ef473c1d2a3da5429aaf01659e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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