1
0
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:
Marliana Lara 2019-11-25 11:17:37 -05:00
parent faa0802d97
commit 1b50895738
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE

View File

@ -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
)
}
/>