1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-11-24 20:06:55 +01:00

fix: handle no app name impact metric (#10997)

This commit is contained in:
Mateusz Kwasniewski 2025-11-19 09:50:56 +01:00 committed by GitHub
parent ccbf375a13
commit d3981baf2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,7 @@ type FormMode = 'create' | 'edit' | 'display';
const getInitialValues = (safeguard?: ISafeguard) => ({
metricName: safeguard?.impactMetric.metricName || '',
appName: safeguard?.impactMetric.labelSelectors.appName[0] || '*',
appName: safeguard?.impactMetric.labelSelectors.appName?.[0] || '*',
aggregationMode: (safeguard?.impactMetric.aggregationMode ||
'rps') as MetricQuerySchemaAggregationMode,
operator: (safeguard?.triggerCondition.operator ||