Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Aug 23, 2023
1 parent b1edfca commit c299cee
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 c299cee

Please sign in to comment.