invert boolean operation for readability and add comment

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2018-06-21 12:14:16 +01:00
parent 0737965079
commit be612998bd
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E

View file

@ -523,8 +523,9 @@ module.exports = React.createClass({
selectedAddresses[addressType].add(address);
});
// Filter out any addresses in the above already selected addresses (matching both type and address)
const filteredSuggestedList = this.state.suggestedList.filter(({address, addressType}) => {
return !selectedAddresses[addressType] || !selectedAddresses[addressType].has(address);
return !(selectedAddresses[addressType] && selectedAddresses[addressType].has(address));
});
const query = [];