From 3a477571d85fb4f41fa2c9057c9dcaba7c6d5bc1 Mon Sep 17 00:00:00 2001 From: Cardy2 Date: Wed, 8 Nov 2023 19:49:43 -0500 Subject: [PATCH] add if statement to getValues function allowing the handler to skip irrelevant data from a data record without error when creating a visualization --- source/core/ui/layer/CurveLayer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/core/ui/layer/CurveLayer.js b/source/core/ui/layer/CurveLayer.js index b854008b1f..54db46e257 100644 --- a/source/core/ui/layer/CurveLayer.js +++ b/source/core/ui/layer/CurveLayer.js @@ -122,8 +122,10 @@ class CurveLayer extends Layer { if (isDefined(properties.getValues)) { let fn = async (rec, timestamp, options) => { const value = await that.getFunc('getValues')(rec,timestamp,options); - that.props.x = value.x; - that.props.y = value.y; + if (value != undefined || null) { + that.props.x = value.x; + that.props.y = value.y; + } }; this.addFn(that.getDataSourcesIdsByProperty('getValues'), fn); }