Skip to content

Commit f54cc07

Browse files
committed
fix(apm): Check if performance.mark() exists
1 parent 236f8d7 commit f54cc07

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [core] fix: Call `bindClient` when creating new `Hub` to make integrations work automatically (#2665)
1111
- [gatsby] feat: Add @sentry/gatsby package (#2652)
1212
- [core] ref: Rename `whitelistUrls/blacklistUrls` to `allowUrls/denyUrls`
13+
- [apm] fix: Check if `performance.mark` exists before calling it
1314

1415
## 5.17.0
1516

packages/apm/src/integrations/tracing.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ export class Tracing implements Integration {
170170
*/
171171
public constructor(_options?: Partial<TracingOptions>) {
172172
if (global.performance) {
173-
global.performance.mark('sentry-tracing-init');
173+
if (global.performance.mark) {
174+
global.performance.mark('sentry-tracing-init');
175+
}
174176
Tracing._trackLCP();
175177
}
176178
const defaults = {

0 commit comments

Comments
 (0)