Skip to content

Commit

Permalink
[B] Add guard for undefined consent cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
1aurend committed Jan 23, 2024
1 parent ce6a1d7 commit 665c1d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/hoc/analytics/hooks/useManifoldAnalytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function getTokens() {
export default function useManifoldAnalytics(location, settings, dispatch) {
const { currentUser } = useFromStore("authentication") ?? {};

const anonConsent = JSON.parse(cookie.read("anonAnalyticsConsent") ?? "");
const anonConsent = JSON.parse(cookie.read("anonAnalyticsConsent") ?? "{}");

const consentManifoldAnalytics =
currentUser?.attributes?.consentManifoldAnalytics ||
Expand Down

0 comments on commit 665c1d5

Please sign in to comment.