Make sure notices element exist before creating <WordPressNotices> (https://github.com/woocommerce/woocommerce-admin/pull/2378)
This commit is contained in:
parent
8ed63c5547
commit
8790655c39
|
@ -254,11 +254,13 @@ class ActivityPanel extends Component {
|
|||
className="woocommerce-layout__activity-panel-tabs"
|
||||
>
|
||||
{ tabs && tabs.map( this.renderTab ) }
|
||||
<WordPressNotices
|
||||
showNotices={ 'wpnotices' === currentTab }
|
||||
togglePanel={ this.togglePanel }
|
||||
onCountUpdate={ this.updateNoticeFlag }
|
||||
/>
|
||||
{ Boolean( document.getElementById( 'wp__notice-list' ) ) && (
|
||||
<WordPressNotices
|
||||
showNotices={ 'wpnotices' === currentTab }
|
||||
togglePanel={ this.togglePanel }
|
||||
onCountUpdate={ this.updateNoticeFlag }
|
||||
/>
|
||||
) }
|
||||
</NavigableMenu>
|
||||
{ this.renderPanel() }
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue