From 27fed7f078f118feae42c8674027958aeaf367f9 Mon Sep 17 00:00:00 2001 From: Jatin Katyal Date: Thu, 25 Mar 2021 17:43:35 +0530 Subject: [PATCH] fix: dev setup when using host with a port --- app/utils/browser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/utils/browser.js b/app/utils/browser.js index 0ebc5e4bf..0e6728570 100644 --- a/app/utils/browser.js +++ b/app/utils/browser.js @@ -1 +1,7 @@ -export const getPublicUrl = () => `${window.location.protocol}//${window.location.hostname}/app/` \ No newline at end of file +export const getPublicUrl = () => { + if (window.location.port) { + return `${window.location.protocol}//${window.location.hostname}:${window.location.port}/app/` + } + + return `${window.location.protocol}//${window.location.hostname}/app/` +}