Skip to content

Commit

Permalink
fix: don't attempt to resolve data if component missing from config
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarchoudhary96 authored Jan 25, 2024
1 parent 1c4c076 commit cc7d391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/lib/use-resolved-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, ComponentData>,
Expand Down

0 comments on commit cc7d391

Please sign in to comment.