Skip to content

Commit

Permalink
Trim gitpod url before open workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh authored and svenefftinge committed Jul 30, 2023
1 parent 69c6a6a commit 748887b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export function renderGitpodUrl(gitpodURL: string): string {
const baseURL = `${window.location.protocol}//${window.location.host}`;
return `${gitpodURL}/#${baseURL}` + window.location.pathname + window.location.search;
const trimmedUrl = gitpodURL.replace(/[\/]+$/g, '');
return `${trimmedUrl}/#${baseURL}` + window.location.pathname + window.location.search;
}

export function isVisible(el: HTMLElement) {
Expand Down

0 comments on commit 748887b

Please sign in to comment.