mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +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) {
|
formatAttributeValue: function (stateObj, attribute) {
|
||||||
var value = stateObj.attributes[attribute];
|
var value = stateObj.attributes[attribute];
|
||||||
|
if (value === null) return '-';
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
return value.join(', ');
|
return value.join(', ');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user