Fix issue #220: The id is object

This commit is contained in:
prototypa
2023-08-11 09:12:37 -04:00
parent 057060e49b
commit 4d91aaa779

View File

@ -1,8 +1,10 @@
---
import { GoogleAnalytics } from '@astrolib/analytics';
import { ANALYTICS_CONFIG } from "~/utils/config";
import { ANALYTICS_CONFIG } from '~/utils/config';
---
<!-- Google Analytics -->
{ANALYTICS_CONFIG?.vendors?.googleAnalytics?.isEnabled && <GoogleAnalytics id={String(ANALYTICS_CONFIG.vendors.googleAnalytics)} partytown={true} />}
{
ANALYTICS_CONFIG?.vendors?.googleAnalytics?.isEnabled && ANALYTICS_CONFIG?.vendors?.googleAnalytics?.id ? (
<GoogleAnalytics id={String(ANALYTICS_CONFIG.vendors.googleAnalytics.id)} partytown={true} />
) : null
}