Skip to content

Commit

Permalink
Check for conflicts.user property before rendering list item (#6396)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierlon authored and westonruter committed Jun 17, 2021
1 parent c9939d5 commit f0f8613
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions assets/src/settings-page/paired-url-structure.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,25 +164,29 @@ function SlugConflictsNotice( { slug, conflicts } ) {
) )
) }

<li>
{
conflicts.user.edit_link ? (
<a href={ conflicts.user.edit_link } target="_blank" rel="noreferrer">
{ __( 'User', 'amp' ) }
</a>
) : (
__( 'User', 'amp' )
)
}
{ ': ' + conflicts.user.name }
{ ' ' }
<small>
{
/* translators: %d is entity ID */
sprintf( __( '(ID: %d)', 'amp' ), conflicts.user.id )
}
</small>
</li>
{
conflicts.user && (
<li>
{
conflicts.user.edit_link ? (
<a href={ conflicts.user.edit_link } target="_blank" rel="noreferrer">
{ __( 'User', 'amp' ) }
</a>
) : (
__( 'User', 'amp' )
)
}
{ ': ' + conflicts.user.name }
{ ' ' }
<small>
{
/* translators: %d is entity ID */
sprintf( __( '(ID: %d)', 'amp' ), conflicts.user.id )
}
</small>
</li>
)
}

{
conflicts.post_type && (
Expand Down

0 comments on commit f0f8613

Please sign in to comment.