mirror of https://github.com/knative/func.git
💄 make array when filters is nil (#2569)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
This commit is contained in:
parent
2b83bac27f
commit
ff6053a92d
|
@ -95,6 +95,11 @@ func updateOrAddSubscription(subscriptions []fn.KnativeSubscription, cfg subscib
|
|||
for i, subscription := range subscriptions {
|
||||
if subscription.Source == cfg.Source {
|
||||
found = true
|
||||
|
||||
if subscription.Filters == nil {
|
||||
subscription.Filters = make(map[string]string)
|
||||
}
|
||||
|
||||
// Update filters. Override if the key already exists.
|
||||
for newKey, newValue := range newFilters {
|
||||
subscription.Filters[newKey] = newValue
|
||||
|
|
Loading…
Reference in New Issue