diff --git a/api/handler/gateway_action.go b/api/handler/gateway_action.go index 38e5964aa..b390eadf4 100644 --- a/api/handler/gateway_action.go +++ b/api/handler/gateway_action.go @@ -1013,7 +1013,7 @@ func (g *GatewayAction) SyncTCPRules(tx *gorm.DB, components []*apimodel.Compone tcpRules []*model.TCPRule ) for _, component := range components { - if component.TCPRules == nil { + if len(component.TCPRules) == 0 { continue } componentIDs = append(componentIDs, component.ComponentBase.ComponentID)