Skip to content

Commit 541694e

Browse files
committed
fix(CBadge): remove optional chaining to support webpack 4
1 parent 5210b8f commit 541694e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/badge/CBadge.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ const CBadge = defineComponent({
6868
{
6969
[`bg-${props.color}`]: props.color,
7070
'position-absolute translate-middle': props.position,
71-
'top-0': props.position?.includes('top'),
72-
'top-100': props.position?.includes('bottom'),
73-
'start-100': props.position?.includes('end'),
74-
'start-0': props.position?.includes('start'),
71+
'top-0': props.position && props.position.includes('top'),
72+
'top-100': props.position && props.position.includes('bottom'),
73+
'start-100': props.position && props.position.includes('end'),
74+
'start-0': props.position && props.position.includes('start'),
7575
[`badge-${props.size}`]: props.size,
7676
[`text-${props.textColor}`]: props.textColor,
7777
},

0 commit comments

Comments
 (0)