Return "-" if AttributeValue = null (#473)

* Return "undefined" if AttributeValue = null

* use var value

* Return "-" if null

* Triple equals
This commit is contained in:
c727 2017-10-25 09:34:03 +02:00 committed by Paulus Schoutsen
parent 27ce63bb0c
commit 7b61826134

View File

@ -68,6 +68,7 @@
formatAttributeValue: function (stateObj, attribute) {
var value = stateObj.attributes[attribute];
if (value === null) return '-';
if (Array.isArray(value)) {
return value.join(', ');
}