diff --git a/waku/v2/protocol/relay/validators.go b/waku/v2/protocol/relay/validators.go index 6450186d5..406e9d08f 100644 --- a/waku/v2/protocol/relay/validators.go +++ b/waku/v2/protocol/relay/validators.go @@ -67,9 +67,10 @@ func (w *WakuRelay) topicValidator(topic string) func(ctx context.Context, peerI } w.topicValidatorMutex.RLock() - validators, exists := w.topicValidators[topic] + validators := w.topicValidators[topic] validators = append(validators, w.defaultTopicValidators...) w.topicValidatorMutex.RUnlock() + exists := len(validators) > 0 if exists { for _, v := range validators {