Skip to content

Commit

Permalink
Fix service control for older browsers (#11629)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Feb 9, 2022
1 parent 134ed7d commit ce3b854
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ha-service-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export class HaServiceControl extends LitElement {
let updatedDefaultValue = false;
if (this._value && serviceData) {
// Set mandatory bools without a default value to false
this._value.data ??= {};
if (!this._value.data) {
this._value.data = {};
}
serviceData.fields.forEach((field) => {
if (
field.selector &&
Expand Down

0 comments on commit ce3b854

Please sign in to comment.