Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Dec 11, 2024
1 parent b4fc532 commit e887b36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/stores/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ import {
SUBDOMAIN_NYC,
SUBDOMAIN_SYD
} from '$lib/constants';
import { building } from '$app/environment';

export function getApiEndpoint(region?: string): string {
if (building) return '';
const url = new URL(
VARS.APPWRITE_ENDPOINT ? VARS.APPWRITE_ENDPOINT : globalThis?.location.toString()
VARS.APPWRITE_ENDPOINT ? VARS.APPWRITE_ENDPOINT : globalThis?.location?.toString()
);
const protocol = url.protocol;
const hostname = url.hostname;
Expand Down

0 comments on commit e887b36

Please sign in to comment.