Skip to content

Commit 1d32874

Browse files
committed
ref: Remove nullish coaloescing operator
1 parent e491e60 commit 1d32874

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/tracing/src/browser/browsertracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export class BrowserTracing implements Integration {
317317
op,
318318
trimEnd: true,
319319
metadata: {
320-
source: this._latestRouteSource ?? 'url',
320+
source: this._latestRouteSource || 'url',
321321
},
322322
};
323323

packages/tracing/src/browser/metrics/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function _addPerformanceNavigationTiming(
304304
}
305305
_startChild(transaction, {
306306
op: 'browser',
307-
description: description ?? event,
307+
description: description || event,
308308
startTimestamp: timeOrigin + msToSec(start),
309309
endTimestamp: timeOrigin + msToSec(end),
310310
});

packages/tracing/src/span.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,17 @@ export class Span implements SpanInterface {
294294
* @inheritDoc
295295
*/
296296
public updateWithContext(spanContext: SpanContext): this {
297-
this.data = spanContext.data ?? {};
297+
this.data = spanContext.data || {};
298298
this.description = spanContext.description;
299299
this.endTimestamp = spanContext.endTimestamp;
300300
this.op = spanContext.op;
301301
this.parentSpanId = spanContext.parentSpanId;
302302
this.sampled = spanContext.sampled;
303-
this.spanId = spanContext.spanId ?? this.spanId;
304-
this.startTimestamp = spanContext.startTimestamp ?? this.startTimestamp;
303+
this.spanId = spanContext.spanId || this.spanId;
304+
this.startTimestamp = spanContext.startTimestamp || this.startTimestamp;
305305
this.status = spanContext.status;
306-
this.tags = spanContext.tags ?? {};
307-
this.traceId = spanContext.traceId ?? this.traceId;
306+
this.tags = spanContext.tags || {};
307+
this.traceId = spanContext.traceId || this.traceId;
308308

309309
return this;
310310
}

packages/tracing/src/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
238238
public updateWithContext(transactionContext: TransactionContext): this {
239239
super.updateWithContext(transactionContext);
240240

241-
this.name = transactionContext.name ?? '';
241+
this.name = transactionContext.name || '';
242242

243243
this._trimEnd = transactionContext.trimEnd;
244244

0 commit comments

Comments
 (0)