Skip to content

Commit b09777b

Browse files
ldurswSamuell1
authored andcommitted
fix(MdListItem): reduce function complexity (#1853)
1 parent 2edc13c commit b09777b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/components/MdList/MdListItem/MdListItem.vue

+8-4
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,19 @@
6767
}
6868
6969
if (shouldRenderButtonWithListener(listeners)) {
70-
if (hasChildrenButtons(children)) {
71-
return MdListItemFakeButton
72-
}
73-
return MdListItemButton
70+
return renderButtonWithListener(children)
7471
}
7572
7673
return MdListItemDefault
7774
}
7875
76+
function renderButtonWithListener (children) {
77+
if (hasChildrenButtons(children)) {
78+
return MdListItemFakeButton
79+
}
80+
return MdListItemButton
81+
}
82+
7983
export default {
8084
name: 'MdListItem',
8185
functional: true,

0 commit comments

Comments
 (0)