This commit is contained in:
Timmy Crawford 2019-07-02 08:35:03 -07:00 committed by GitHub
parent 0c1ed070b9
commit f60c96b572
1 changed files with 3 additions and 2 deletions

View File

@ -84,6 +84,9 @@ class WordPressNotices extends Component {
const notice = notices.children[ i ];
if ( ! notice ) {
continue;
} else if ( 0 === notice.innerHTML.length ) {
// Ignore empty elements in this part of the DOM.
continue;
} else if ( ! this.shouldCollapseNotice( notice ) ) {
uncollapsedTargetArea.insertAdjacentElement( 'afterend', notice );
} else {
@ -91,8 +94,6 @@ class WordPressNotices extends Component {
}
}
count = count - 1; // Remove 1 for `wp-header-end` which is a child of wp__notice-list
this.props.onCountUpdate( count );
this.setState( { count, notices, noticesOpen, screenMeta, screenLinks } );