Skip to content

Commit

Permalink
Editor: Avoid remounts of DocumentBar (#62214)
Browse files Browse the repository at this point in the history
* Incorporate PostTypeSupportCheck in DocumentBar

* Remove PostTypeSupportCheck from DocumentBar

Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • Loading branch information
3 people authored and ellatrix committed Jun 11, 2024
1 parent b11b514 commit 54d4ee6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/editor/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import MoreMenu from '../more-menu';
import PostPreviewButton from '../post-preview-button';
import PostPublishButtonOrToggle from '../post-publish-button/post-publish-button-or-toggle';
import PostSavedState from '../post-saved-state';
import PostTypeSupportCheck from '../post-type-support-check';
import PostViewLink from '../post-view-link';
import PreviewDropdown from '../preview-dropdown';
import { store as editorStore } from '../../store';
Expand Down Expand Up @@ -117,13 +116,7 @@ function Header( {
! isBlockToolsCollapsed && hasTopToolbar,
} ) }
>
{ ! title ? (
<PostTypeSupportCheck supportKeys="title">
<DocumentBar />
</PostTypeSupportCheck>
) : (
title
) }
{ ! title ? <DocumentBar /> : title }
</div>
</motion.div>
<motion.div
Expand Down

0 comments on commit 54d4ee6

Please sign in to comment.