Skip to content

Commit

Permalink
remove unnecessary read
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaLeithy committed Aug 13, 2024
1 parent a433e5f commit b8ee9d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion packages/clarity-js/src/data/consent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export let data: ConsentData = null;

export function consent(value: boolean): void {
if (core.active) {
data = { source: 1, value: value.toString() };
data = { source: 2, value: value.toString() };

encode(Event.Consent);
}
Expand Down
3 changes: 0 additions & 3 deletions packages/clarity-js/src/data/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ export function consent(status: boolean = true): void {
config.track = true;
track(user(), BooleanFlag.True);
save();

// Read cookie data again to mark as consented
read();
trackConsent.consent(status);
}
}
Expand Down

0 comments on commit b8ee9d2

Please sign in to comment.