mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 04:46:34 +00:00
Invalidate theme cache when switching demo's (#5305)
* Invalidate theme cache when switching demo's * Move to mock hass
This commit is contained in:
parent
7170f06c08
commit
b9367a33a8
@ -1,4 +1,7 @@
|
||||
import { applyThemesOnElement } from "../common/dom/apply_themes_on_element";
|
||||
import {
|
||||
applyThemesOnElement,
|
||||
invalidateThemeCache,
|
||||
} from "../common/dom/apply_themes_on_element";
|
||||
|
||||
import { demoConfig } from "./demo_config";
|
||||
import { demoServices } from "./demo_services";
|
||||
@ -224,6 +227,7 @@ export const provideHass = (
|
||||
(eventListeners[event] || []).forEach((fn) => fn(event));
|
||||
},
|
||||
mockTheme(theme) {
|
||||
invalidateThemeCache();
|
||||
hass().updateHass({
|
||||
selectedTheme: theme ? "mock" : "default",
|
||||
themes: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user