From 2646c9787e6456f8c2cb845c776eff6b0966fd48 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Fri, 26 Nov 2021 21:00:15 +0100 Subject: [PATCH] Changed key-checking to value-checking This includes e.g. gettings, originally not included in keys --- src/streamHandler/PacketInfluxPointFactory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/streamHandler/PacketInfluxPointFactory.js b/src/streamHandler/PacketInfluxPointFactory.js index 8d76878..a89415e 100644 --- a/src/streamHandler/PacketInfluxPointFactory.js +++ b/src/streamHandler/PacketInfluxPointFactory.js @@ -37,7 +37,7 @@ class PacketInfluxPointFactory extends Transform{ _transform(packet, encoding, next){ // Create measurements MEASUREMENT_MAP.forEach((objKey, measurement) => { - if(!Object.keys(packet).includes(objKey)) return; + if(packet[objKey] == null) return; let point = new Point(measurement); // Create point