mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-02 00:27:49 +01:00
Fix gallery integration card crash from invalid mock hassUrl (#30126)
The gallery mock set hass.auth.data.hassUrl to an empty string, which caused brandsUrl() to throw when constructing a URL via new URL(base, ''). In production hassUrl is always a valid URL, so the mock now uses location.origin to match real behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -196,7 +196,7 @@ export const provideHass = (
|
||||
// Home Assistant properties
|
||||
auth: {
|
||||
data: {
|
||||
hassUrl: "",
|
||||
hassUrl: location.origin,
|
||||
},
|
||||
} as any,
|
||||
connection: {
|
||||
|
||||
Reference in New Issue
Block a user