From 728991cda53e011505042f4b28d26e6a410a4ab8 Mon Sep 17 00:00:00 2001 From: Kai Arrowood Date: Wed, 3 Jan 2024 16:29:08 -0500 Subject: [PATCH] fix(routes): datadog errors [khcp-10204] (#1047) --- .../entities/entities-routes/src/components/RouteForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/entities/entities-routes/src/components/RouteForm.vue b/packages/entities/entities-routes/src/components/RouteForm.vue index 02237a8d44..8ffa383fa6 100644 --- a/packages/entities/entities-routes/src/components/RouteForm.vue +++ b/packages/entities/entities-routes/src/components/RouteForm.vue @@ -673,7 +673,7 @@ const handleAddRoutingRuleEntity = (entity: string): void => { // display or hide routing rules selector const displayRoutingRulesSelector = computed(() => { - return routingRulesPerProtocolMap[form.fields.protocols].filter(protocol => !form.fields[protocol as RoutingRuleEntity]) + return routingRulesPerProtocolMap[form.fields.protocols]?.filter(protocol => !form.fields[protocol as RoutingRuleEntity]) }) // removes rule entity from the form @@ -720,7 +720,7 @@ const sanitizeRoutingRulesEntities = () => { const routingRulesEntities = Object.keys(form.fields).filter(element => allRoutingRulesEntities.includes(element)) routingRulesEntities.forEach(entity => { - if (!protocolEntities.includes(entity)) { + if (!protocolEntities?.includes(entity)) { handleRemoveRoutingRuleEntity(entity) } })