Skip to content

armgit / core

Public Imported from GitHub
0

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

check if format is not an empty object (#645)

vlichtenbergc3538192ad86
diff --git a/ui/component/core/src/util.ts b/ui/component/core/src/util.ts
index dd717887b..cb93a05c4 100644
--- a/ui/component/core/src/util.ts
+++ b/ui/component/core/src/util.ts
@@ -514,7 +514,7 @@ export function getValueAsString(value: any, formatProvider: () => ValueFormat |
const format = formatProvider && formatProvider();
- if (format) {
+ if (format && Object.keys(format).length !== 0) {
if (typeof(value) === "number") {
if (format.asBoolean) {
value = !!value;