Allow empty entities array with entity-filter (#7854)

This commit is contained in:
Philip Allgaier 2020-12-02 16:34:59 +01:00 committed by GitHub
parent faec063f34
commit 5e481880bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,7 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
}
public setConfig(config: EntitiesCardConfig): void {
if (!config || !config.entities.length) {
if (!config.entities || !Array.isArray(config.entities)) {
throw new Error("Entities must be specified");
}