Handle nil receiver S in ContainsAny method within tags.go.

This commit is contained in:
2025-09-13 21:23:59 +01:00
parent 2ccdc5e756
commit f5cce92bf8

View File

@@ -47,6 +47,9 @@ func (s *S) Append(t ...*T) {
// ContainsAny returns true if any of the values given in `values` matches any
// of the tag elements.
func (s *S) ContainsAny(tagName []byte, values [][]byte) bool {
if s == nil {
return false
}
if len(tagName) < 1 {
return false
}