From a18413c842d4e3eff190fe1640654c295ee6b01e Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 21 Jan 2026 11:14:09 -0800 Subject: [PATCH 1/2] handle empty getBackendUrl --- reflex/.templates/web/utils/state.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index f0f3874a79f..473a29537f9 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -89,6 +89,9 @@ export const getToken = () => { * @returns The given URL modified to point to the actual backend server. */ export const getBackendURL = (url_str) => { + if (url_str ?? undefined === undefined) { + url_str = env.PING; + } // Get backend URL object from the endpoint. const endpoint = new URL(url_str); if ( From b2c87a29e665b3381c0bb5ae8c16276300c1750c Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 21 Jan 2026 11:25:31 -0800 Subject: [PATCH 2/2] ok --- reflex/.templates/web/utils/state.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 473a29537f9..e45857357ba 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -89,7 +89,7 @@ export const getToken = () => { * @returns The given URL modified to point to the actual backend server. */ export const getBackendURL = (url_str) => { - if (url_str ?? undefined === undefined) { + if ((url_str ?? undefined) === undefined) { url_str = env.PING; } // Get backend URL object from the endpoint.