We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ec97c5 commit 5822772Copy full SHA for 5822772
packages/performance/src/resources/trace.ts
@@ -185,10 +185,7 @@ export class Trace implements PerformanceTrace {
185
*/
186
putMetric(counter: string, numAsInteger: number): void {
187
if (isValidMetricName(counter, this.name)) {
188
- this.counters[counter] =
189
- numAsInteger === undefined
190
- ? 0
191
- : convertMetricValueToInteger(numAsInteger);
+ this.counters[counter] = convertMetricValueToInteger(numAsInteger ?? 0);
192
} else {
193
throw ERROR_FACTORY.create(ErrorCode.INVALID_CUSTOM_METRIC_NAME, {
194
customMetricName: counter
0 commit comments