mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
[dir view] fixed the bug 'folder does not exist'(remove the effect of '?notifications=all', which is added to the URL when the 'view all notifications' dialog is open.) (#5861)
This commit is contained in:
@@ -127,7 +127,7 @@ class LibContentView extends React.Component {
|
|||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
// eg: http://127.0.0.1:8000/library/repo_id/repo_name/**/**/\
|
// eg: http://127.0.0.1:8000/library/repo_id/repo_name/**/**/\
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
let location = window.location.href.split('#')[0];
|
let location = window.location.href.split('?')[0]; // '?': to remove the effect of '?notifications=all', which is added to the URL when the 'view all notifications' dialog is open.
|
||||||
location = decodeURIComponent(location);
|
location = decodeURIComponent(location);
|
||||||
let path = location.slice(location.indexOf(repoID) + repoID.length + 1); // get the string after repoID
|
let path = location.slice(location.indexOf(repoID) + repoID.length + 1); // get the string after repoID
|
||||||
path = path.slice(path.indexOf('/')); // get current path
|
path = path.slice(path.indexOf('/')); // get current path
|
||||||
|
Reference in New Issue
Block a user