Skip to content

armgit / core

Public Imported from GitHub
0

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

Improved null/undefined check

Michael Rademaker668d5c415131
diff --git a/ui/component/core/src/util.ts b/ui/component/core/src/util.ts
index 576e9c4c9..90ad05f58 100644
--- a/ui/component/core/src/util.ts
+++ b/ui/component/core/src/util.ts
@@ -889,7 +889,7 @@ export function dispatchCancellableEvent<T>(target: EventTarget, event: CustomEv
export function fillInDatapointGaps(data: ValueDatapoint<any>[]) {
var prevValue: ValueDatapoint<any>;
data.forEach(value => {
- if (prevValue && prevValue.y && !value.y) {
+ if (value.y == null && prevValue && prevValue.y) {
value.y = prevValue.y;
}
prevValue = value;