Skip to content

Commit

Permalink
fix: fix rootResolver behaviour when using recommended root data API
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Nov 20, 2023
1 parent b598144 commit 5c13de5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/components/Puck/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ export function Puck({
if (selectedItem) {
currentProps = selectedItem.props;
} else {
currentProps = data.root;
currentProps = rootProps;
}

const newProps = {
Expand Down Expand Up @@ -578,12 +578,12 @@ export function Puck({
if (config.root?.resolveData) {
resolveData({
...data,
root: { props: { newProps } },
root: { props: newProps },
});
} else {
dispatch({
type: "setData",
data: { root: { props: { newProps } } },
data: { root: { props: newProps } },
});
}
} else {
Expand Down

0 comments on commit 5c13de5

Please sign in to comment.