Skip to content

Commit cf4ecd5

Browse files
committed
Remove app name if not provided
1 parent 3f7aa17 commit cf4ecd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/roku-card.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ export class RokuCard extends LitElement {
6868
<ha-card .header="${this._config.name}">
6969
<div class="remote">
7070
<div class="row">
71-
<div class="app">${stateObj ? stateObj.attributes.app_name : ''}</div>
71+
${stateObj?.attributes?.app_name
72+
? html`
73+
<div class="app">${stateObj.attributes.app_name}</div>
74+
`
75+
: ''}
7276
${this._config.tv || (this._config.power && this._config.power.show)
7377
? this._renderButton('power', 'mdi:power', 'Power')
7478
: ''}

0 commit comments

Comments
 (0)