Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Fix value problem in or-attribute-input

Robin Dekkers775fbd98ffee
diff --git a/ui/component/or-attribute-input/src/index.ts b/ui/component/or-attribute-input/src/index.ts
index f25a8d0ac..0bba593e5 100644
--- a/ui/component/or-attribute-input/src/index.ts
+++ b/ui/component/or-attribute-input/src/index.ts
@@ -133,8 +133,7 @@ export function getAttributeValueTemplate(
if (inputType === InputType.JSON && value !== null && typeof(value) !== "string") {
value = JSON.stringify(value, null, 2);
}
-
- return Util.getAttributeValue(attribute, attributeDescriptor);
+ return Util.getAttributeValue(attribute, attributeDescriptor) ? Util.getAttributeValue(attribute, attributeDescriptor) : value;
};
const setValue = (value: any) => {