chore: prefer nullish coalescing (#7125)

This commit is contained in:
neverland
2020-09-07 20:36:49 +08:00
committed by GitHub
parent c7303786ae
commit 4ffa6ead1e
15 changed files with 27 additions and 37 deletions
+1 -4
View File
@@ -71,10 +71,7 @@ export default createComponent({
<div class={bem({ active })} style={{ color }} onClick={this.onClick}>
<div class={bem('icon')}>
{this.genIcon(active)}
<Info
dot={this.dot}
info={isDef(this.badge) ? this.badge : this.info}
/>
<Info dot={this.dot} info={this.badge ?? this.info} />
</div>
<div class={bem('text')}>{this.slots('default', { active })}</div>
</div>