mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Use short circuit operator in favor of ternary conditional
This commit is contained in:
parent
faa0802d97
commit
1b50895738
@ -165,12 +165,12 @@ function InventoryHosts({ i18n, location, match }) {
|
||||
itemsToDelete={selected}
|
||||
pluralizedItemName={i18n._(t`Hosts`)}
|
||||
/>,
|
||||
canAdd ? (
|
||||
canAdd && (
|
||||
<ToolbarAddButton
|
||||
key="add"
|
||||
linkTo={`/inventories/inventory/${match.params.id}/hosts/add`}
|
||||
/>
|
||||
) : null,
|
||||
),
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
@ -186,12 +186,12 @@ function InventoryHosts({ i18n, location, match }) {
|
||||
/>
|
||||
)}
|
||||
emptyStateControls={
|
||||
canAdd ? (
|
||||
canAdd && (
|
||||
<ToolbarAddButton
|
||||
key="add"
|
||||
linkTo={`/inventories/inventory/${match.params.id}/add`}
|
||||
/>
|
||||
) : null
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user