diff --git a/query/query.go b/query/query.go index 9dd132ca..69b800cc 100644 --- a/query/query.go +++ b/query/query.go @@ -281,6 +281,10 @@ func evalConstants(q Q) Q { if s.Regexp.Op == syntax.OpEmptyMatch { return &Const{true} } + case *Branch: + if s.Pattern == "" { + return &Const{true} + } } return q }