Skip to content

Commit

Permalink
Use post.type as hook dependency instead of full post object
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerB24890 committed Jun 12, 2024
1 parent 5c98bf6 commit 40c2fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const ExperimentalEditorProvider = withRegistryProvider(
mode: postTypeObject?.default_rendering_mode ?? 'post-only',
};
},
[ post ]
[ post.type ]
);
const shouldRenderTemplate = !! template && mode !== 'post-only';
const rootLevelPost = shouldRenderTemplate ? template : post;
Expand Down

0 comments on commit 40c2fa3

Please sign in to comment.