Skip to content

Commit

Permalink
fix(useDraggable): update type
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 19, 2022
1 parent a21bd2b commit 0ef8f8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/useDraggable/index.ts
Expand Up @@ -33,7 +33,7 @@ export interface UseDraggableOptions {
*
* @default window
*/
draggingElement?: MaybeRef<HTMLElement | SVGElement | Window | Document | null>
draggingElement?: MaybeRef<HTMLElement | SVGElement | Window | Document | null | undefined>

/**
* Pointer types that listen to.
Expand Down Expand Up @@ -72,7 +72,7 @@ export interface UseDraggableOptions {
* @param target
* @param options
*/
export function useDraggable(target: MaybeRef<HTMLElement | SVGElement | null>, options: UseDraggableOptions = {}) {
export function useDraggable(target: MaybeRef<HTMLElement | SVGElement | null | undefined>, options: UseDraggableOptions = {}) {
const draggingElement = options.draggingElement ?? defaultWindow
const position: Ref<Position> = ref(options.initialValue ?? { x: 0, y: 0 })
const pressedDelta = ref<Position>()
Expand Down

0 comments on commit 0ef8f8f

Please sign in to comment.