Skip to content

Commit

Permalink
Merge pull request #83 from hookdeck/connection-name
Browse files Browse the repository at this point in the history
fix: Check if connection has a name before comparing with connection query
  • Loading branch information
leggetter authored Jun 5, 2024
2 parents b67ba9c + 42af240 commit a679609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/listen/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func getConnections(client *hookdeckclient.Client, source *hookdecksdk.Source, c
}
var filteredConnections []*hookdecksdk.Connection
for _, connection := range connections {
if (is_path && connection.Destination.CliPath != nil && strings.Contains(*connection.Destination.CliPath, connectionQuery)) || *connection.Name == connectionQuery {
if (is_path && connection.Destination.CliPath != nil && strings.Contains(*connection.Destination.CliPath, connectionQuery)) || (connection.Name != nil && *connection.Name == connectionQuery) {
filteredConnections = append(filteredConnections, connection)
}
}
Expand Down

0 comments on commit a679609

Please sign in to comment.