Skip to content

Commit

Permalink
Edit Post: Remove unused 'hasHistory' flag (#67293)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: talldan <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent e349487 commit 99c6478
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions packages/edit-post/src/components/browser-url/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down
3 changes: 1 addition & 2 deletions packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ function Layout( {
showIconLabels,
isDistractionFree,
showMetaBoxes,
hasHistory,
isWelcomeGuideVisible,
templateId,
enablePaddingAppender,
Expand Down Expand Up @@ -595,7 +594,7 @@ function Layout( {
<PostLockedModal />
<EditorInitialization />
<FullscreenMode isActive={ isFullscreenActive } />
<BrowserURL hasHistory={ hasHistory } />
<BrowserURL />
<UnsavedChangesWarning />
<AutosaveMonitor />
<LocalAutosaveMonitor />
Expand Down

1 comment on commit 99c6478

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 99c6478.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12026543928
📝 Reported issues:

Please sign in to comment.