Skip to content

Commit

Permalink
fix: vue3 slot
Browse files Browse the repository at this point in the history
  • Loading branch information
plantain-00 committed Oct 7, 2020
1 parent b69545b commit 40a9d53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export const Node = defineComponent({
}
},
nodeClassName(): string {
return common.getNodeClassName(this.data, this.last, !!this.$slots.default)
const hasChildren = typeof this.$slots.default === 'function' ? this.$slots.default().length > 0 : !!this.$slots.default
return common.getNodeClassName(this.data, this.last, hasChildren)
},
anchorClassName(): string {
return common.getAnchorClassName(this.data, this.hovered, this.path)
Expand Down

0 comments on commit 40a9d53

Please sign in to comment.