Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Ensure absolute URL paths start with / (#2623)
Browse files Browse the repository at this point in the history
Fixes #2618
  • Loading branch information
nicksellen committed Dec 12, 2022
1 parent c0d7f76 commit 48e64a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/absoluteURL.js
Expand Up @@ -8,5 +8,6 @@

export const absoluteURL = path => {
const origin = process.env.MODE === 'cordova' ? process.env.KARROT.BACKEND : window.location.origin
if (!path.startsWith('/')) path = '/' + path
return `${origin}${path}`
}

0 comments on commit 48e64a6

Please sign in to comment.