Skip to content

Commit

Permalink
fix: comment breaking VClicks
Browse files Browse the repository at this point in the history
  • Loading branch information
bru02 committed Jun 17, 2023
1 parent c80c39d commit 7f16d72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/client/builtin/VClicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { toArray } from '@antfu/utils'
import type { Directive, VNode, VNodeArrayChildren } from 'vue'

import { defineComponent, h, isVNode, resolveDirective, withDirectives } from 'vue'
import { Comment, defineComponent, h, isVNode, resolveDirective, withDirectives } from 'vue'

const listTags = ['ul', 'ol']

Expand Down Expand Up @@ -77,7 +77,7 @@ export default defineComponent({
const mapChildren = (children: VNodeArrayChildren, depth = 1): [VNodeArrayChildren, number] => {
let idx = 0
const vNodes = children.map((i) => {
if (!isVNode(i))
if (!isVNode(i) || i.type === Comment)
return i
const directive = idx % this.every === 0 ? click : after
let vNode
Expand Down

0 comments on commit 7f16d72

Please sign in to comment.