Skip to content

Commit

Permalink
fix routing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Apr 2, 2024
1 parent 595b06e commit 1223f36
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const root_url_re = new RegExp('^' + escape_re(root_url));
function get_root_path() {
if (self.registration) {
const url = new URL(registration.scope);
return url.pathname;
return url.pathname.replace(/\/$/, '');
}
return location.pathname.replace(/\/[^\/]+$/, '');
}
Expand Down
Loading

0 comments on commit 1223f36

Please sign in to comment.