diff --git a/lib/instrumenter/src/instrumenter.ts b/lib/instrumenter/src/instrumenter.ts index 7a841bf678f2..34f2011c7d7f 100644 --- a/lib/instrumenter/src/instrumenter.ts +++ b/lib/instrumenter/src/instrumenter.ts @@ -546,9 +546,9 @@ export function instrument>( let forceInstrument = false; let skipInstrument = false; - if (global.window.location?.search?.includes('instrument=true')) { + if (global.window.location?.search?.indexOf('instrument=true') !== -1) { forceInstrument = true; - } else if (global.window.location?.search?.includes('instrument=false')) { + } else if (global.window.location?.search?.indexOf('instrument=false') !== -1) { skipInstrument = true; }