From cc7d391503cce3cbdbad9b769b5fb0fca6610cb0 Mon Sep 17 00:00:00 2001 From: Sagar Choudhary Date: Thu, 25 Jan 2024 16:22:52 +0530 Subject: [PATCH] fix: don't attempt to resolve data if component missing from config --- packages/core/lib/use-resolved-data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/lib/use-resolved-data.ts b/packages/core/lib/use-resolved-data.ts index 3fc31e880b..94aaf8d080 100644 --- a/packages/core/lib/use-resolved-data.ts +++ b/packages/core/lib/use-resolved-data.ts @@ -47,7 +47,7 @@ export const useResolvedData = ( const flatContent = Object.keys(newData.zones || {}) .reduce((acc, zone) => [...acc, ...newData.zones![zone]], newData.content) - .filter((item) => !!config.components[item.type].resolveData); + .filter((item) => !!config.components[item.type]?.resolveData); const applyIfChange = ( dynamicDataMap: Record,