Skip to content

Commit

Permalink
fix: encapsulate every row in array, and spread when pushing to content
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Jul 9, 2023
1 parent c0097ba commit 0cd0862
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions android-tv-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,14 @@ class TVCardServices extends LitElement {
case 'volume_row': {
if (this._config.volume_row == 'buttons') {
row = [
this.buildIconButton('volume_down'),
this.buildIconButton('volume_mute'),
this.buildIconButton('volume_up'),
[
this.buildIconButton('volume_down'),
this.buildIconButton('volume_mute'),
this.buildIconButton('volume_up'),
],
];
} else if (this._config.volume_row == 'slider') {
row.push(this.volume_slider);
row.push([this.volume_slider]);
}
break;
}
Expand All @@ -583,7 +585,7 @@ class TVCardServices extends LitElement {
this.buildIconButton('right'),
];
let down_row = [this.buildIconButton('down')];
row.push(...[up_row, middle_row, down_row]);
row.push([up_row, middle_row, down_row]);
break;
}

Expand All @@ -603,17 +605,17 @@ class TVCardServices extends LitElement {
</toucharea>
`,
];
row.push(touchpad);
row.push([touchpad]);
}
}
break;
}

default: {
row = this.buildButtonsFromActions(row_actions);
row = [this.buildButtonsFromActions(row_actions)];
}
}
content.push(row);
content.push(...row);
}
});

Expand Down

0 comments on commit 0cd0862

Please sign in to comment.