chore: prefer nullish coalescing (#7125)
This commit is contained in:
+2
-5
@@ -1,5 +1,5 @@
|
||||
// Utils
|
||||
import { createNamespace, addUnit, isDef } from '../utils';
|
||||
import { createNamespace, addUnit } from '../utils';
|
||||
import { inherit } from '../utils/functional';
|
||||
|
||||
// Components
|
||||
@@ -64,10 +64,7 @@ function Icon(
|
||||
>
|
||||
{slots.default && slots.default()}
|
||||
{imageIcon && <img class={bem('image')} src={name} />}
|
||||
<Info
|
||||
dot={props.dot}
|
||||
info={isDef(props.badge) ? props.badge : props.info}
|
||||
/>
|
||||
<Info dot={props.dot} info={props.badge ?? props.info} />
|
||||
</props.tag>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user