Skip to content

Commit

Permalink
Fixed bug with not checking for errors before calling isMetricNameFil…
Browse files Browse the repository at this point in the history
…ter()
  • Loading branch information
possibull committed Jan 14, 2025
1 parent 648dcb6 commit c8daf08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,13 +887,13 @@ func expandWithExpr(was []*withArgExpr, e Expr) (Expr, error) {
lfeNew.IsNegative = lfe.IsNegative
lfeNew.IsRegexp = lfe.IsRegexp
lf, err := lfeNew.toLabelFilter()
if err != nil {
return nil, err
}
if lf.isMetricNameFilter() {
metricName = lf.Value
continue
}
if err != nil {
return nil, err
}
lfsNew = append(lfsNew, *lf)
}
lfsNew = removeDuplicateLabelFilters(lfsNew)
Expand Down

0 comments on commit c8daf08

Please sign in to comment.