Skip to content

Commit 27fed7f

Browse files
committed
fix: dev setup when using host with a port
1 parent 7ef9418 commit 27fed7f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/utils/browser.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
export const getPublicUrl = () => `${window.location.protocol}//${window.location.hostname}/app/`
1+
export const getPublicUrl = () => {
2+
if (window.location.port) {
3+
return `${window.location.protocol}//${window.location.hostname}:${window.location.port}/app/`
4+
}
5+
6+
return `${window.location.protocol}//${window.location.hostname}/app/`
7+
}

0 commit comments

Comments
 (0)