Skip to content

Commit

Permalink
Merge pull request #345 from metrico/fix_343
Browse files Browse the repository at this point in the history
#fix 343
  • Loading branch information
akvlad authored Aug 23, 2023
2 parents 31ff61d + c299cee commit 3ea54b2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

/**
Expand Down Expand Up @@ -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))
}

/**
Expand Down

0 comments on commit 3ea54b2

Please sign in to comment.