1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

Chapter jump (#2307)

This commit is contained in:
C_Q
2018-08-28 17:59:24 +08:00
committed by Daniel Pan
parent 61f0c49cd4
commit 0815a90a90
2 changed files with 20 additions and 15 deletions

View File

@@ -142,8 +142,9 @@ class Wiki extends Component {
})
})
let fileUrl = serviceUrl + '/wikis/' + slug + filePath;
window.history.pushState({urlPath: fileUrl, filePath: filePath}, filePath, fileUrl);
const hash = window.location.hash;
let fileUrl = serviceUrl + '/wikis/' + slug + filePath + hash;
window.history.pushState({urlPath: fileUrl, filePath: filePath}, filePath, fileUrl);
}
onpopstate = (event) => {