Skip to content

Commit a679609

Browse files
authored
Merge pull request #83 from hookdeck/connection-name
fix: Check if connection has a name before comparing with connection query
2 parents b67ba9c + 42af240 commit a679609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/listen/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func getConnections(client *hookdeckclient.Client, source *hookdecksdk.Source, c
3838
}
3939
var filteredConnections []*hookdecksdk.Connection
4040
for _, connection := range connections {
41-
if (is_path && connection.Destination.CliPath != nil && strings.Contains(*connection.Destination.CliPath, connectionQuery)) || *connection.Name == connectionQuery {
41+
if (is_path && connection.Destination.CliPath != nil && strings.Contains(*connection.Destination.CliPath, connectionQuery)) || (connection.Name != nil && *connection.Name == connectionQuery) {
4242
filteredConnections = append(filteredConnections, connection)
4343
}
4444
}

0 commit comments

Comments
 (0)