Skip to content

Commit

Permalink
fix(MdListItem): reduce function complexity (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldursw authored and Samuell1 committed Jul 11, 2018
1 parent 2edc13c commit b09777b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/components/MdList/MdListItem/MdListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,19 @@
}
if (shouldRenderButtonWithListener(listeners)) {
if (hasChildrenButtons(children)) {
return MdListItemFakeButton
}
return MdListItemButton
return renderButtonWithListener(children)
}
return MdListItemDefault
}
function renderButtonWithListener (children) {
if (hasChildrenButtons(children)) {
return MdListItemFakeButton
}
return MdListItemButton
}
export default {
name: 'MdListItem',
functional: true,
Expand Down

0 comments on commit b09777b

Please sign in to comment.