Skip to content

Commit

Permalink
fix: better default values for hass and config
Browse files Browse the repository at this point in the history
  • Loading branch information
brunosabot committed Sep 1, 2024
1 parent 456850a commit c50f707
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/streamline-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { version } from "../package.json";
class StreamlineCard extends HTMLElement {
_editMode = false;
_isConnected = false;
_config = {};
_originalConfig = {};
_hass = {};
_card;
_config = undefined;
_originalConfig = undefined;
_hass = undefined;
_card = undefined;
_shadow;
_accessedProperties = new Set();

Expand Down Expand Up @@ -110,8 +110,7 @@ import { version } from "../package.json";
this._originalConfig.variables,
);

const hassState = this._hass?.states ?? undefined;
if (typeof hassState !== "undefined") {
if (typeof this._hass !== "undefined") {
evaluateConfig(this._config, this._hass);
}
}
Expand Down

0 comments on commit c50f707

Please sign in to comment.