From af09a1a117f13394978bb0f3405d446075dfa547 Mon Sep 17 00:00:00 2001 From: Matteo Trubini <7964032+matteotrubini@users.noreply.github.com> Date: Sun, 27 Nov 2022 14:34:40 +0100 Subject: [PATCH] gtag() check If gtag() is undefined an error is raised. --- .../console/scaffold/theme/tailwind/assets/src/js/theme.stub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms/console/scaffold/theme/tailwind/assets/src/js/theme.stub b/modules/cms/console/scaffold/theme/tailwind/assets/src/js/theme.stub index c37fa2b621..416aa12526 100644 --- a/modules/cms/console/scaffold/theme/tailwind/assets/src/js/theme.stub +++ b/modules/cms/console/scaffold/theme/tailwind/assets/src/js/theme.stub @@ -28,6 +28,6 @@ }); }(jQuery)); -if (typeof(gtag) !== 'function') { +if (typeof(gtag) !== 'undefined' && typeof(gtag) !== 'function') { gtag = function() { console.log('GoogleAnalytics not present.'); } }