1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-15 16:04:01 +00:00

repair history.back bug

This commit is contained in:
shanshuirenjia 2019-04-22 18:39:44 +08:00
parent ee16a419b1
commit 05ebc4936b

View File

@ -126,8 +126,12 @@ class Wiki extends Component {
const hash = window.location.hash;
let fileUrl = siteRoot + 'wikis/' + slug + Utils.encodePath(filePath) + hash;
if (filePath === '/home.md') {
window.history.replaceState({url: fileUrl, path: filePath}, filePath, fileUrl);
} else {
window.history.pushState({url: fileUrl, path: filePath}, filePath, fileUrl);
}
}
loadDirentList = (dirPath) => {
this.setState({isDataLoading: true});