Skip to content

Commit

Permalink
fix: Fix sandbox URL in getSandboxUrl function (#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbud committed Jan 15, 2024
1 parent 0167c43 commit 44adb5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/histoire-app/src/app/util/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export function getSandboxUrl (story: Story, variant: Variant) {
const url = new URLSearchParams()
url.append('storyId', story.id)
url.append('variantId', variant.id)
return `${base}__sandbox.html?${url.toString()}`
const baseUrl = base === '/' ? base : base + '/'
return `${baseUrl}__sandbox.html?${url.toString()}`
}

0 comments on commit 44adb5c

Please sign in to comment.