mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
Delete weekdays key from time condition when emptied from the UI (#14992)
Co-authored-by: Paul Bottein <paul.bottein@gmail.com> fixes undefined
This commit is contained in:
parent
134670604b
commit
10369ff952
@ -152,7 +152,9 @@ export class HaTimeCondition extends LitElement implements ConditionElement {
|
||||
delete newValue.mode_before;
|
||||
|
||||
Object.keys(newValue).forEach((key) =>
|
||||
newValue[key] === undefined || newValue[key] === ""
|
||||
newValue[key] === undefined ||
|
||||
newValue[key] === "" ||
|
||||
(Array.isArray(newValue[key]) && newValue[key].length === 0)
|
||||
? delete newValue[key]
|
||||
: {}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user