Skip to content

Commit

Permalink
Fix route plugins null state
Browse files Browse the repository at this point in the history
  • Loading branch information
suslovsergey committed Dec 27, 2021
1 parent 8bf6d0d commit c2e0c4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apisix/model/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func RouteTypeStateToMap(state RouteType, isUpdate bool) (map[string]interface{}
for i := 0; i < e.NumField(); i++ {
if !e.Field(i).IsNil() {
e.Field(i).Interface().(PluginCommonInterface).StateToMap(plugins, isUpdate)
} else {
} else if isUpdate {
plugins[reflect.New(e.Type().Field(i).Type.Elem()).Interface().(PluginCommonInterface).Name()] = nil
}
}
Expand Down

0 comments on commit c2e0c4c

Please sign in to comment.