Skip to content

Commit

Permalink
fix(range): touchmove 回调中 rect 获取失败时终止 (#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Mar 15, 2024
1 parent 96dc951 commit e44afe4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/packages/range/range.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export const Range: FunctionComponent<
setDragStatus('draging')

const rect = await getRectByTaro(root.current)
if (!rect) return
let delta = touch.deltaX.current
let total = rect.width
let diff = (delta / total) * scope()
Expand Down

0 comments on commit e44afe4

Please sign in to comment.