Skip to content

Commit 748887b

Browse files
mustard-mhsvenefftinge
authored andcommitted
Trim gitpod url before open workspaces
1 parent 69c6a6a commit 748887b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export function renderGitpodUrl(gitpodURL: string): string {
22
const baseURL = `${window.location.protocol}//${window.location.host}`;
3-
return `${gitpodURL}/#${baseURL}` + window.location.pathname + window.location.search;
3+
const trimmedUrl = gitpodURL.replace(/[\/]+$/g, '');
4+
return `${trimmedUrl}/#${baseURL}` + window.location.pathname + window.location.search;
45
}
56

67
export function isVisible(el: HTMLElement) {

0 commit comments

Comments
 (0)