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
+2 -2
View File
@@ -1,4 +1,4 @@
import { createNamespace, isDef } from '../utils';
import { createNamespace } from '../utils';
import { ChildrenMixin } from '../mixins/relation';
import { route, routeProps } from '../utils/router';
import Info from '../info';
@@ -46,7 +46,7 @@ export default createComponent({
{this.title}
<Info
dot={this.dot}
info={isDef(this.badge) ? this.badge : this.info}
info={this.badge ?? this.info}
class={bem('info')}
/>
</div>