From 192021c23810e526f39a52f832001f171c2f01e4 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Fri, 26 Jul 2024 12:41:30 +0300 Subject: [PATCH] No panic if source filter is not specified --- pkg/graph/constructor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/graph/constructor.go b/pkg/graph/constructor.go index 374ba58edd8..0668bbdb143 100644 --- a/pkg/graph/constructor.go +++ b/pkg/graph/constructor.go @@ -247,7 +247,7 @@ func (g *Graph) fetchEventTypes(ctx context.Context, config ConstructorConfig, e if err == nil { for _, eventType := range eventTypes.Items { - if config.ShouldAddEventType(eventType) { + if config.ShouldAddEventType == nil || config.ShouldAddEventType(eventType) { err := g.AddEventType(eventType) if err != nil { return err