From 99c6478b0c8582d334d2d26e6303db61828da092 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 26 Nov 2024 12:22:00 +0400 Subject: [PATCH] Edit Post: Remove unused 'hasHistory' flag (#67293) Co-authored-by: Mamaduka Co-authored-by: talldan --- packages/edit-post/src/components/browser-url/index.js | 5 ++--- packages/edit-post/src/components/layout/index.js | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/edit-post/src/components/browser-url/index.js b/packages/edit-post/src/components/browser-url/index.js index 12292cb8447217..00492afbdc2624 100644 --- a/packages/edit-post/src/components/browser-url/index.js +++ b/packages/edit-post/src/components/browser-url/index.js @@ -27,14 +27,13 @@ export class BrowserURL extends Component { } componentDidUpdate( prevProps ) { - const { postId, postStatus, hasHistory } = this.props; + const { postId, postStatus } = this.props; const { historyId } = this.state; if ( ( postId !== prevProps.postId || postId !== historyId ) && postStatus !== 'auto-draft' && - postId && - ! hasHistory + postId ) { this.setBrowserURL( postId ); } diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index aec14eab989f03..5dcbfa2c82cea1 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -392,7 +392,6 @@ function Layout( { showIconLabels, isDistractionFree, showMetaBoxes, - hasHistory, isWelcomeGuideVisible, templateId, enablePaddingAppender, @@ -595,7 +594,7 @@ function Layout( { - +