Skip to content

Commit

Permalink
Let's not replace the text node as React does not like it at all. I'm…
Browse files Browse the repository at this point in the history
… not sure of the mechanism behind the error, but the page fails when React attempt to unmount components. It's looking for a precise node tree it appears. (#42508)
  • Loading branch information
ramonjd authored May 21, 2020
1 parent e39bf4a commit a0a1945
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ function updateSettingsBar() {

// 'Update'/'Publish' primary button to become 'Save' tertiary button.
const saveButton = settingsBar.querySelector( '.editor-post-publish-button__button' );
saveButton && ( saveButton.innerText = __( 'Save' ) );
// This line causes a reconciliation error in React and a page bork
// leaving it in there until we can decide on the UX for this component
//saveButton && ( saveButton.innerText = __( 'Save' ) );

// Wrap 'Launch' button link to frankenflow.
const launchLink = document.createElement( 'a' );
Expand All @@ -51,6 +53,6 @@ function updateSettingsBar() {

// Put 'Launch' and 'Save' back on bar in desired order.
settingsBar.prepend( launchLink );
settingsBar.prepend( saveButton );
saveButton && settingsBar.prepend( saveButton );
} );
}

0 comments on commit a0a1945

Please sign in to comment.