Skip to content

Commit be43052

Browse files
authored
handle empty getBackendUrl (#6093)
* handle empty getBackendUrl * ok
1 parent a52d240 commit be43052

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

reflex/.templates/web/utils/state.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export const getToken = () => {
8989
* @returns The given URL modified to point to the actual backend server.
9090
*/
9191
export const getBackendURL = (url_str) => {
92+
if ((url_str ?? undefined) === undefined) {
93+
url_str = env.PING;
94+
}
9295
// Get backend URL object from the endpoint.
9396
const endpoint = new URL(url_str);
9497
if (

0 commit comments

Comments
 (0)