Skip to content

Commit

Permalink
Move parseInt up
Browse files Browse the repository at this point in the history
  • Loading branch information
louwie17 committed Dec 5, 2024
1 parent a0c5fa9 commit 5e2d674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/edit-site/src/components/post-edit/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ export default function PostEditHeader( { postType, postId } ) {
);

if ( ids.length === 1 ) {
return <PostCardPanel postType={ postType } postId={ ids[ 0 ] } />;
return (
<PostCardPanel
postType={ postType }
postId={ parseInt( ids[ 0 ], 10 ) }
/>
);
}

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-card-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function PostCardPanel( {
[ postId, postType ]
);

const pageTypeBadge = usePageTypeBadge( parseInt( postId, 10 ) );
const pageTypeBadge = usePageTypeBadge( postId );

return (
<div className="editor-post-card-panel">
Expand Down

0 comments on commit 5e2d674

Please sign in to comment.