Skip to content

Commit

Permalink
Fix detection of current version (#54)
Browse files Browse the repository at this point in the history
Fixes #53.
  • Loading branch information
jbms committed Mar 30, 2022
1 parent 943c447 commit 3b1a1a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/assets/javascripts/integrations/version/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export function setupVersionSelector(
config.version!.versionPath ?? "../versions.json", config.base))

/* Determine current version */
const getCanonical = (version: string) => new URL(version, config.base).toString().replace(/\/*$/, "")
const versionBase = new URL("..", config.base)
const getCanonical = (version: string) => new URL(version, versionBase).toString().replace(/\/*$/, "")
const current$ = versions$
.pipe(
map(versions => {
Expand Down

0 comments on commit 3b1a1a0

Please sign in to comment.