Skip to content

Commit

Permalink
chore: eventOptions type fix (#6298)
Browse files Browse the repository at this point in the history
chore: type fix
  • Loading branch information
1587315093 authored Aug 10, 2023
1 parent 83b5947 commit d919096
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/components/picker-view/wheel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,7 @@ export const Wheel = memo<Props>(
axis: 'y',
from: () => [0, y.get()],
preventDefault: true,
eventOptions:
(supportsPassive as unknown as AddEventListenerOptions) && {
passive: false,
},
eventOptions: supportsPassive ? { passive: false } : undefined,
}
)

Expand Down
4 changes: 1 addition & 3 deletions src/components/pull-to-refresh/pull-to-refresh.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ export const PullToRefresh: FC<PullToRefreshProps> = p => {
axis: 'y',
target: elementRef,
enabled: !props.disabled,
eventOptions: supportsPassive
? { passive: false }
: (false as unknown as AddEventListenerOptions),
eventOptions: supportsPassive ? { passive: false } : undefined,
}
)

Expand Down

0 comments on commit d919096

Please sign in to comment.