@@ -3,7 +3,7 @@ import { Integration, Severity } from '@sentry/types';
33import { isFunction , isString } from '@sentry/utils/is' ;
44import { getEventDescription , getGlobalObject , parseUrl } from '@sentry/utils/misc' ;
55import { deserialize , fill } from '@sentry/utils/object' ;
6- import { safeJoin } from '@sentry/utils/string' ;
6+ import { includes , safeJoin } from '@sentry/utils/string' ;
77import { supportsBeacon , supportsHistory , supportsNativeFetch } from '@sentry/utils/supports' ;
88import { BrowserOptions } from '../backend' ;
99import { breadcrumbEventHandler , keypressEventHandler , wrap } from './helpers' ;
@@ -97,7 +97,7 @@ export class Breadcrumbs implements Integration {
9797
9898 // if Sentry key appears in URL, don't capture it as a request
9999 // but rather as our own 'sentry' type breadcrumb
100- if ( options . filterUrl && url . includes ( options . filterUrl ) ) {
100+ if ( options . filterUrl && includes ( url , options . filterUrl ) ) {
101101 addSentryBreadcrumb ( data ) ;
102102 return result ;
103103 }
@@ -210,7 +210,7 @@ export class Breadcrumbs implements Integration {
210210
211211 // if Sentry key appears in URL, don't capture it as a request
212212 // but rather as our own 'sentry' type breadcrumb
213- if ( options . filterUrl && url . includes ( options . filterUrl ) ) {
213+ if ( options . filterUrl && includes ( url , options . filterUrl ) ) {
214214 if ( method === 'POST' && args [ 1 ] && args [ 1 ] . body ) {
215215 addSentryBreadcrumb ( args [ 1 ] . body ) ;
216216 }
@@ -371,7 +371,7 @@ export class Breadcrumbs implements Integration {
371371 } ;
372372 // if Sentry key appears in URL, don't capture it as a request
373373 // but rather as our own 'sentry' type breadcrumb
374- if ( isString ( url ) && ( options . filterUrl && url . includes ( options . filterUrl ) ) ) {
374+ if ( isString ( url ) && ( options . filterUrl && includes ( url , options . filterUrl ) ) ) {
375375 this . __sentry_own_request__ = true ;
376376 }
377377 return originalOpen . apply ( this , args ) ;
0 commit comments