diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b4e9ee209..4b626c581b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,9 @@ The types of changes are:
## [Unreleased](https://github.com/ethyca/fides/compare/2.25.0...main)
+### Fixed
+- Fix type errors when TCF vendors have no dataDeclaration [#4465](https://github.com/ethyca/fides/pull/4465)
+
## [2.25.0](https://github.com/ethyca/fides/compare/2.24.1...2.25.0)
### Added
diff --git a/clients/fides-js/src/components/tcf/TcfVendors.tsx b/clients/fides-js/src/components/tcf/TcfVendors.tsx
index aed0a06027..44cb5c3c02 100644
--- a/clients/fides-js/src/components/tcf/TcfVendors.tsx
+++ b/clients/fides-js/src/components/tcf/TcfVendors.tsx
@@ -99,7 +99,8 @@ const DataCategories = ({
}
// @ts-ignore this type doesn't exist in v2.2 but does in v3
- const declarations: GvlDataDeclarations = gvlVendor.dataDeclaration;
+ const declarations: GvlDataDeclarations | undefined =
+ gvlVendor.dataDeclaration;
return (
@@ -109,11 +110,11 @@ const DataCategories = ({
- {declarations.map((id) => {
+ {declarations?.map((id) => {
const category = dataCategories[id];
return (
- {category.name} |
+ {category?.name || ""} |
);
})}
diff --git a/clients/privacy-center/cypress/fixtures/consent/experience_tcf.json b/clients/privacy-center/cypress/fixtures/consent/experience_tcf.json
index 70e2e43c74..31dd982499 100644
--- a/clients/privacy-center/cypress/fixtures/consent/experience_tcf.json
+++ b/clients/privacy-center/cypress/fixtures/consent/experience_tcf.json
@@ -390,6 +390,13 @@
"vendorListVersion": 19,
"tcfPolicyVersion": 4,
"lastUpdated": "2023-09-21T16:07:34Z",
+ "dataCategories": {
+ "1": {
+ "id": 1,
+ "name": "Device Data",
+ "description": "Data that pertains to a device, including OS information and cross-device identification capabilities."
+ }
+ },
"purposes": {
"1": {
"id": 1,
@@ -457,7 +464,7 @@
"legIntClaim": "https://www.captifytechnologies.com/privacy-notice/"
}
],
- "dataDeclaration": [],
+ "dataDeclaration": null,
"deviceStorageDisclosureUrl": "https://static.cpx.to/gvl/deviceStorageDisclosure.json"
}
},