From: Dessalines Date: Tue, 13 Oct 2020 20:43:05 +0000 (-0500) Subject: Fix httpBase adding a : . Fixes #56 X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60https:/%24%7Bargs.thread.url%7D?a=commitdiff_plain;h=ecb54ed43dc250aaba4b5ada968859c640f2687a;p=lemmy-ui.git Fix httpBase adding a : . Fixes #56 --- diff --git a/src/shared/env.ts b/src/shared/env.ts index 0490e2c..b4aae60 100644 --- a/src/shared/env.ts +++ b/src/shared/env.ts @@ -4,9 +4,9 @@ const testHost = 'localhost:8536'; const internalHost = process.env.LEMMY_INTERNAL_HOST || testHost; // used for local dev export const externalHost = isBrowser() - ? `${window.location.hostname}:${ - window.location.port == '1234' || window.location.port == '1235' - ? 8536 + ? `${window.location.hostname}${ + ['1234', '1235'].includes(window.location.port) + ? ':8536' : window.location.port }` : process.env.LEMMY_EXTERNAL_HOST || testHost;