mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Return "-" if AttributeValue = null (#473)
* Return "undefined" if AttributeValue = null * use var value * Return "-" if null * Triple equals
This commit is contained in:
parent
27ce63bb0c
commit
7b61826134
@ -68,6 +68,7 @@
|
||||
|
||||
formatAttributeValue: function (stateObj, attribute) {
|
||||
var value = stateObj.attributes[attribute];
|
||||
if (value === null) return '-';
|
||||
if (Array.isArray(value)) {
|
||||
return value.join(', ');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user