Skip to content

Commit

Permalink
Account for passed env vars with quickstart (#19605)
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek authored Apr 10, 2024
1 parent faebc73 commit 916faa4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/dashboard/src/components/QuickStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ const QuickStart: FC = () => {
const hashValue = hash.slice(1);
let contextUrl: URL;
try {
contextUrl = new URL(hashValue);
// We have to account for the case where environment variables are provided through the hash, so we search it for the URL.
const toParse = hashValue.match(/^https?:/) ? hashValue : hashValue.slice(hashValue.indexOf("/") + 1);
contextUrl = new URL(toParse);
} catch {
setError("Invalid context URL");
return;
Expand Down

0 comments on commit 916faa4

Please sign in to comment.