mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 04:06:35 +00:00
Make sure config is always frozen. Not just on error (#4871)
This commit is contained in:
parent
2d018fff6c
commit
d8ae3439de
@ -266,7 +266,7 @@ class LovelacePanel extends LitElement {
|
|||||||
|
|
||||||
private _checkLovelaceConfig(config: LovelaceConfig) {
|
private _checkLovelaceConfig(config: LovelaceConfig) {
|
||||||
// Somehow there can be badges with value null, we remove those
|
// Somehow there can be badges with value null, we remove those
|
||||||
let checkedConfig;
|
let checkedConfig = !Object.isFrozen(config) ? config : undefined;
|
||||||
config.views.forEach((view, index) => {
|
config.views.forEach((view, index) => {
|
||||||
if (view.badges && !view.badges.every(Boolean)) {
|
if (view.badges && !view.badges.every(Boolean)) {
|
||||||
checkedConfig = checkedConfig || {
|
checkedConfig = checkedConfig || {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user