Skip to content

Commit f860e37

Browse files
wanglxi1hustcc
andauthored
修复 animation 未释放导致内存溢出的BUG (#361)
* 修复 animation 未释放导致内存溢出的BUG * Use optional chaining for animation cancellation --------- Co-authored-by: hustcc <i@hust.cc>
1 parent 9426c37 commit f860e37

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/ui/navigator/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export class Navigator extends Component<NavigatorStyleProps> {
146146
);
147147

148148
onAnimateFinished(animation, () => {
149+
animation?.cancel();
149150
this.innerCurrPage = pageNum;
150151
this.playState = 'idle';
151152
this.setVisiblePages([pageNum]);

0 commit comments

Comments
 (0)