Skip to content

Commit

Permalink
pref(onLongPress): remove unnecessary code (#3555)
Browse files Browse the repository at this point in the history
Co-authored-by: banruo <shl@dataqin.com>
  • Loading branch information
huiliangShen and banruo committed Dec 4, 2023
1 parent 0422078 commit 31401be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/onLongPress/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Fn } from '@vueuse/shared'
import { computed } from 'vue-demi'
import type { MaybeElementRef } from '../unrefElement'
import { unrefElement } from '../unrefElement'
Expand Down Expand Up @@ -67,7 +66,7 @@ export function onLongPress(
const cleanup = [
useEventListener(elementRef, 'pointerdown', onDown, listenerOptions),
useEventListener(elementRef, ['pointerup', 'pointerleave'], clear, listenerOptions),
].filter(Boolean) as Fn[]
]

const stop = () => cleanup.forEach(fn => fn())

Expand Down

0 comments on commit 31401be

Please sign in to comment.