Skip to content

Commit 6672971

Browse files
committed
Only render provides list if non-empty.
1 parent cd9f2da commit 6672971

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

assets/js/components/dialog.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,17 @@ class Dialog extends Component {
9494
{ subtitle }
9595
</p>
9696
}
97-
<section id={ describedByID } className="mdc-dialog__content">
98-
<ul className="mdc-list mdc-list--underlined mdc-list--non-interactive">
99-
{ provides && provides.map( ( attribute ) => (
100-
<li className="mdc-list-item" key={ attribute }>
101-
<span className="mdc-list-item__text">{ attribute }</span>
102-
</li>
103-
) ) }
104-
</ul>
105-
</section>
97+
{ ( provides && provides.length ) &&
98+
<section id={ describedByID } className="mdc-dialog__content">
99+
<ul className="mdc-list mdc-list--underlined mdc-list--non-interactive">
100+
{ provides.map( ( attribute ) => (
101+
<li className="mdc-list-item" key={ attribute }>
102+
<span className="mdc-list-item__text">{ attribute }</span>
103+
</li>
104+
) ) }
105+
</ul>
106+
</section>
107+
}
106108
{ dependentModules &&
107109
<p className="mdc-dialog__dependecies">
108110
<strong>{ __( 'Note: ', 'google-site-kit' ) }</strong>{ dependentModules }

0 commit comments

Comments
 (0)