mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Fix for undefined stateObj in media player row (#8114)
This commit is contained in:
parent
2b0f43f334
commit
0d281f8437
@ -82,7 +82,6 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
|
||||
}
|
||||
|
||||
const stateObj = this.hass.states[this._config.entity] as MediaPlayerEntity;
|
||||
const state = stateObj.state;
|
||||
|
||||
if (!stateObj) {
|
||||
return html`
|
||||
@ -92,6 +91,8 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
|
||||
`;
|
||||
}
|
||||
|
||||
const state = stateObj.state;
|
||||
|
||||
const buttons = html`
|
||||
${!this._narrow &&
|
||||
state === "playing" &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user