Skip to content

Commit

Permalink
🧽 ensure no double forward slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejpurves committed Nov 28, 2023
1 parent 16ea0fe commit fbf3780
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/jupyter/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ export function useLaunchBinder() {
if (userServerUrl && location) {
// add the location to the url pathname
const url = new URL(userServerUrl);
if (url.pathname.endsWith('/')) url.pathname = url.pathname.slice(0, -1);
url.pathname = `${url.pathname}/lab/tree${location}`;
url.pathname = `${url.pathname}lab/tree${location}`.replace(/\/+/g, '/');
userServerUrl = url.toString();
}
return userServerUrl;
Expand Down

0 comments on commit fbf3780

Please sign in to comment.