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)) } /**