Skip to content

Commit

Permalink
chore: check only animateParam exists
Browse files Browse the repository at this point in the history
  • Loading branch information
malangfox committed Sep 27, 2023
1 parent b64a234 commit 18e1396
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/conveyer/src/Conveyer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class Conveyer extends Component<ConveyerEvents> {
} else {
scrollAreaElement.scrollTop -= scroll;
}
if (!e.isTrusted && animateParam?.duration) {
if (!e.isTrusted && animateParam) {
animateParam.expectedPos -= scroll;
const scrollPos = options.horizontal ? scrollAreaElement.scrollLeft : scrollAreaElement.scrollTop;
const diffPos = animateParam.expectedPos - scrollPos;
Expand Down

0 comments on commit 18e1396

Please sign in to comment.