Browse Source

fix: ensure conditional display uses boolean

Prevents the display of an unwanted "0" by ensuring that conditional
uses an actual boolean value.
renovate/lint-staged-8.x
Tom Kirkpatrick 7 years ago
parent
commit
828be27630
No known key found for this signature in database GPG Key ID: 72203A8EC5967EA8
  1. 4
      app/components/Contacts/Network.js

4
app/components/Contacts/Network.js

@ -214,7 +214,7 @@ class Network extends Component {
)}
<ul className={filterPulldown && styles.fade}>
{loadingChannelPubkeys.length &&
{loadingChannelPubkeys.length > 0 &&
loadingChannelPubkeys.map(loadingPubkey => {
// TODO(jimmymow): refactor this out. same logic is in displayNodeName above
const node = nodes.find(n => loadingPubkey === n.pub_key)
@ -237,7 +237,7 @@ class Network extends Component {
</li>
)
})}
{currentChannels.length &&
{currentChannels.length > 0 &&
currentChannels.map((channelObj, index) => {
const channel = Object.prototype.hasOwnProperty.call(channelObj, 'channel')
? channelObj.channel

Loading…
Cancel
Save