mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 02:10:24 +00:00
repair history nav bug (#3195)
This commit is contained in:
@@ -151,7 +151,18 @@ class LibContentView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onpopstate = (event) => {
|
onpopstate = (event) => {
|
||||||
if (event.state && event.state.path) {
|
if (event.state && event.state.key) { // root path
|
||||||
|
if (this.state.path === '/') {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
let path = '/';
|
||||||
|
this.loadDirentList(path);
|
||||||
|
this.setState({
|
||||||
|
path: path,
|
||||||
|
isViewFile: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (event.state && event.state.path) { // file path
|
||||||
let path = event.state.path;
|
let path = event.state.path;
|
||||||
if (this.state.currentMode === 'column') {
|
if (this.state.currentMode === 'column') {
|
||||||
if (Utils.isMarkdownFile(path)) { // Judging not strict
|
if (Utils.isMarkdownFile(path)) { // Judging not strict
|
||||||
|
Reference in New Issue
Block a user