From c299ceed739d4e48a944a0221f3a5ad60466753b Mon Sep 17 00:00:00 2001 From: akvlad Date: Wed, 23 Aug 2023 16:19:07 +0300 Subject: [PATCH] fix --- .../stream_selector_operator_registry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/registry/stream_selector_operator_registry/stream_selector_operator_registry.js b/parser/registry/stream_selector_operator_registry/stream_selector_operator_registry.js index 02a72b74..7aa0cc98 100644 --- a/parser/registry/stream_selector_operator_registry/stream_selector_operator_registry.js +++ b/parser/registry/stream_selector_operator_registry/stream_selector_operator_registry.js @@ -118,7 +118,7 @@ module.exports.neqExtraLabels = (token/*, query */) => { */ module.exports.neqStream = (token/*, query */) => { const [label, value] = labelAndVal(token) - return (e) => e.labels[label] && e.labels[label] !== value + return (e) => isEOF(e) || (e && e.labels[label] && e.labels[label] !== value) } /** @@ -159,7 +159,7 @@ module.exports.nregExtraLabels = (token/*, query */) => { module.exports.nregStream = (token/*, query */) => { const [label, value] = labelAndVal(token) const re = new RegExp(value) - return (e) => e.labels[label] && !e.labels[label].match(re) + return (e) => isEOF(e) || (e && e.labels[label] && !e.labels[label].match(re)) } /**