Skip to content

Commit

Permalink
use obj vals instead of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
eastandwestwind committed Oct 19, 2023
1 parent 61c2a09 commit df8d339
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clients/fides-js/src/lib/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
} from "./consent-utils";
import type { TcfCookieConsent, TcfSavePreferences } from "./tcf/types";
import { TCF_KEY_MAP } from "./tcf/constants";
import { TcfCookieKeyConsent } from "./tcf/types";

/**
* Store the user's consent preferences on the cookie, as key -> boolean pairs, e.g.
Expand Down Expand Up @@ -87,7 +88,9 @@ export const tcfConsentCookieObjHasSomeConsentSet = (
if (!tcf_consent) {
return false;
}
return Object.keys(tcf_consent).some((val) => Object.keys(val).length >= 0);
return Object.values(tcf_consent).some(
(val: TcfCookieKeyConsent) => Object.keys(val).length >= 0
);
};

/**
Expand Down

0 comments on commit df8d339

Please sign in to comment.