Skip to content

Commit

Permalink
Editor: Avoid remounts of DocumentBar (WordPress#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 patil-vipul committed Jun 17, 2024
1 parent 7a5c589 commit 16c1287
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 16c1287

Please sign in to comment.