Guard for undefined values in attribute filtering (#9089)

This commit is contained in:
Bram Kragten 2021-05-05 10:32:24 +02:00 committed by GitHub
parent 6e5e2625d6
commit 2af211b543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,7 +410,7 @@ class HaPanelDevState extends EventsMixin(LocalizeMixin(PolymerElement)) {
const attributeValue = value.attributes[key];
if (
attributeValue !== null &&
attributeValue !== undefined &&
JSON.stringify(attributeValue).toLowerCase().includes(valueFilter)
) {
return true;