Skip to content

Commit 1722248

Browse files
committed
Correct cases of == and != to === and !==.
1 parent 10ba4da commit 1722248

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/performance/src/utils/attributes_utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function getEffectiveConnectionType(): EffectiveConnectionType {
9595
}
9696

9797
export function isValidCustomAttributeName(name: string): boolean {
98-
if (name.length == 0 || name.length > MAX_ATTRIBUTE_NAME_LENGTH) {
98+
if (name.length === 0 || name.length > MAX_ATTRIBUTE_NAME_LENGTH) {
9999
return false;
100100
}
101101
const matchesReservedPrefix = RESERVED_ATTRIBUTE_PREFIXES.some(prefix =>
@@ -105,5 +105,5 @@ export function isValidCustomAttributeName(name: string): boolean {
105105
}
106106

107107
export function isValidCustomAttributeValue(value: string): boolean {
108-
return value.length != 0 && value.length <= MAX_ATTRIBUTE_VALUE_LENGTH;
108+
return value.length !== 0 && value.length <= MAX_ATTRIBUTE_VALUE_LENGTH;
109109
}

packages/performance/src/utils/metric_utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const MAX_METRIC_NAME_LENGTH = 100;
1919
const RESERVED_AUTO_PREFIX = '_';
2020

2121
export function isValidCustomMetricName(name: string): boolean {
22-
if (name.length == 0 || name.length > MAX_METRIC_NAME_LENGTH) {
22+
if (name.length === 0 || name.length > MAX_METRIC_NAME_LENGTH) {
2323
return false;
2424
}
2525
return !name.startsWith(RESERVED_AUTO_PREFIX);

0 commit comments

Comments
 (0)