From 3a4bd3df6c663b2034d80e822d688f540a5c71ae Mon Sep 17 00:00:00 2001 From: Fernando Lucchesi Date: Tue, 1 Nov 2022 06:53:01 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Check=20for=20dynatrace=20before?= =?UTF-8?q?=20calling=20function=20#1309?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/pageComponents/Dynatrace.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/pageComponents/Dynatrace.js b/web/pageComponents/Dynatrace.js index 6f58134b5..2bc737d20 100644 --- a/web/pageComponents/Dynatrace.js +++ b/web/pageComponents/Dynatrace.js @@ -1,3 +1,7 @@ /* eslint-disable no-undef */ -export const enableDynatrace = () => dtrum?.enable() -export const disableDynatrace = () => dtrum?.disable() +export const enableDynatrace = () => { + if (dtrum) dtrum?.enable() +} +export const disableDynatrace = () => { + if (dtrum) dtrum?.disable() +}