diff options
Diffstat (limited to 'common/predicate/predicate.go')
-rw-r--r-- | common/predicate/predicate.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/predicate/predicate.go b/common/predicate/predicate.go index f9cb1bb2b..f71536474 100644 --- a/common/predicate/predicate.go +++ b/common/predicate/predicate.go @@ -24,6 +24,9 @@ func (p P[T]) And(ps ...P[T]) P[T] { return false } } + if p == nil { + return true + } return p(v) } } @@ -36,6 +39,9 @@ func (p P[T]) Or(ps ...P[T]) P[T] { return true } } + if p == nil { + return false + } return p(v) } } |