Fix CPU and Browser Usuage (#4935)

This commit is contained in:
Zack Arnett 2020-02-20 03:57:14 -05:00 committed by GitHub
parent 52609dded9
commit fc88922ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,9 +87,11 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
return;
}
const oldConfig = changedProps.get("_config") as
| HistoryGraphCardConfig
| undefined;
if (!changedProps.has("_config")) {
return;
}
const oldConfig = changedProps.get("_config") as HistoryGraphCardConfig;
if (oldConfig !== this._config) {
this._getStateHistory();