From ecbee8781521a81d7d4dd035649201c57f29bc32 Mon Sep 17 00:00:00 2001 From: erinz2020 Date: Tue, 1 Oct 2024 16:02:03 +0000 Subject: [PATCH] check public_url --- frontend/src/App.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index eaac754141..3027a9ef38 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -51,7 +51,9 @@ function App() { setFilters({}); }; - const publicUrl = process.env.PUBLIC_URL ? new URL(process.env.PUBLIC_URL).pathname : "/"; + const publicUrl = process.env.PUBLIC_URL + ? (process.env.PUBLIC_URL.startsWith('http') ? new URL(process.env.PUBLIC_URL).pathname : process.env.PUBLIC_URL) + : "/"; return (