Skip to content

Commit e5b9b01

Browse files
committed
fix sonar
1 parent 89ca385 commit e5b9b01

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/src/AWS.Lambda.Powertools.Metrics/Model/MetricDirective.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ public List<string> AllDimensionKeys
121121

122122
defaultKeys.AddRange(keys);
123123

124-
return defaultKeys.Any() ? defaultKeys : new List<string>();
124+
if (defaultKeys.Count == 0) defaultKeys = new List<string>();
125+
126+
return defaultKeys;
125127
}
126128
}
127129

0 commit comments

Comments
 (0)