Skip to content

Commit 1da3451

Browse files
authored
fix(v-touch): set event handlers on root components (#21997)
fix #21768
1 parent a15edec commit 1da3451

File tree

1 file changed

+2
-2
lines changed
  • packages/vuetify/src/directives/touch

1 file changed

+2
-2
lines changed

packages/vuetify/src/directives/touch/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function mounted (el: HTMLElement, binding: TouchDirectiveBinding) {
120120
const options = value?.options ?? { passive: true }
121121
const uid = binding.instance?.$.uid // TODO: use custom uid generator
122122

123-
if (!target || !uid) return
123+
if (!target || uid === undefined) return
124124

125125
const handlers = createHandlers(binding.value)
126126

@@ -136,7 +136,7 @@ function unmounted (el: HTMLElement, binding: TouchDirectiveBinding) {
136136
const target = binding.value?.parent ? el.parentElement : el
137137
const uid = binding.instance?.$.uid
138138

139-
if (!target?._touchHandlers || !uid) return
139+
if (!target?._touchHandlers || uid === undefined) return
140140

141141
const handlers = target._touchHandlers[uid]
142142

0 commit comments

Comments
 (0)