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,5 +1,5 @@
// Utils
import { createNamespace, addUnit, isDef } from '../utils';
import { createNamespace, addUnit } from '../utils';
import { emit, inherit } from '../utils/functional';
// Components
@@ -65,7 +65,7 @@ function TreeSelect(
const Navs = items.map((item) => (
<SidebarItem
dot={item.dot}
info={isDef(item.badge) ? item.badge : item.info}
info={item.badge ?? item.info}
title={item.text}
disabled={item.disabled}
class={[bem('nav-item'), item.className]}