From 4d91aaa779ad51616cd05df5d6e78d7b7b89a104 Mon Sep 17 00:00:00 2001 From: prototypa Date: Fri, 11 Aug 2023 09:12:37 -0400 Subject: [PATCH] Fix issue #220: The id is object --- src/components/common/Analytics.astro | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/common/Analytics.astro b/src/components/common/Analytics.astro index 9ed08d8..076d7e4 100644 --- a/src/components/common/Analytics.astro +++ b/src/components/common/Analytics.astro @@ -1,8 +1,10 @@ --- import { GoogleAnalytics } from '@astrolib/analytics'; -import { ANALYTICS_CONFIG } from "~/utils/config"; - +import { ANALYTICS_CONFIG } from '~/utils/config'; --- - -{ANALYTICS_CONFIG?.vendors?.googleAnalytics?.isEnabled && } \ No newline at end of file +{ + ANALYTICS_CONFIG?.vendors?.googleAnalytics?.isEnabled && ANALYTICS_CONFIG?.vendors?.googleAnalytics?.id ? ( + + ) : null +}