mirror of
https://github.com/ansible/awx.git
synced 2026-01-22 15:08:03 -03:30
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…
x
Reference in New Issue
Block a user