Skip to content

Commit

Permalink
[dir view] fixed the bug 'folder does not exist'(remove the effect of…
Browse files Browse the repository at this point in the history
… '?notifications=all', which is added to the URL when the 'view all notifications' dialog is open.)
  • Loading branch information
llj committed Dec 26, 2023
1 parent 473aa29 commit c0e91dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/lib-content-view/lib-content-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class LibContentView extends React.Component {
async componentDidMount() {
// eg: http://127.0.0.1:8000/library/repo_id/repo_name/**/**/\
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);
let path = location.slice(location.indexOf(repoID) + repoID.length + 1); // get the string after repoID
path = path.slice(path.indexOf('/')); // get current path
Expand Down

0 comments on commit c0e91dd

Please sign in to comment.