Skip to content

Commit 800de09

Browse files
authored
fix(angular): Add check for global.location in angular universal (#4513)
1 parent 193b2ec commit 800de09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular/src/tracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function routingInstrumentation(
2727
stashedStartTransaction = customStartTransaction;
2828
stashedStartTransactionOnLocationChange = startTransactionOnLocationChange;
2929

30-
if (startTransactionOnPageLoad) {
30+
if (startTransactionOnPageLoad && global && global.location) {
3131
customStartTransaction({
3232
name: global.location.pathname,
3333
op: 'pageload',

0 commit comments

Comments
 (0)