Skip to content

Commit d9759f3

Browse files
committed
Prevent rendering empty notice element
1 parent 7c8b454 commit d9759f3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

assets/src/settings-page/site-scan.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,18 +294,20 @@ function SiteScanSummary() {
294294

295295
return (
296296
<>
297-
<AMPNotice type={ NOTICE_TYPE_INFO } size={ NOTICE_SIZE_LARGE }>
298-
{ stale && (
297+
{ stale && (
298+
<AMPNotice type={ NOTICE_TYPE_INFO } size={ NOTICE_SIZE_LARGE }>
299299
<p>
300300
{ __( 'Stale results. Rescan your site to ensure everything is working properly.', 'amp' ) }
301301
</p>
302-
) }
303-
{ ! stale && isReady && (
302+
</AMPNotice>
303+
) }
304+
{ ! stale && isReady && (
305+
<AMPNotice type={ NOTICE_TYPE_INFO } size={ NOTICE_SIZE_LARGE }>
304306
<p>
305307
{ __( 'No changes since your last scan.', 'amp' ) }
306308
</p>
307-
) }
308-
</AMPNotice>
309+
</AMPNotice>
310+
) }
309311
{ themesWithAmpIncompatibility.length > 0 && (
310312
<ThemesWithAmpIncompatibility
311313
slugs={ themesWithAmpIncompatibility }

0 commit comments

Comments
 (0)