From 98ec2ab04de660492f04738a828d8d9afdc42cd1 Mon Sep 17 00:00:00 2001 From: Jono Kolnik <1164060+JonathanKolnik@users.noreply.github.com> Date: Wed, 27 Jul 2022 09:09:16 -0400 Subject: [PATCH] Update instrumenter.ts --- code/lib/instrumenter/src/instrumenter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/lib/instrumenter/src/instrumenter.ts b/code/lib/instrumenter/src/instrumenter.ts index a5e1c05bd220..ea41efe879c8 100644 --- a/code/lib/instrumenter/src/instrumenter.ts +++ b/code/lib/instrumenter/src/instrumenter.ts @@ -604,13 +604,13 @@ export function instrument>( let forceInstrument = false; let skipInstrument = false; - if (global?.window?.location?.search?.includes('instrument=true')) { + if (global.window.location?.search?.includes('instrument=true')) { forceInstrument = true; - } else if (global?.window?.location?.search?.includes('instrument=false')) { + } else if (global.window.location?.search?.includes('instrument=false')) { skipInstrument = true; } - // Don't do any instrumentation if not loaded in an iframe and it's not running in a capture. + // Don't do any instrumentation if not loaded in an iframe unless it's forced - instrumentation can also be skipped. if ((global.window.parent === global.window && !forceInstrument) || skipInstrument) { return obj; }