Skip to content

Commit 6ea1f92

Browse files
authored
Merge pull request #12 from RoarRain/master
修复RCTMJScrollView 有时会Crash问题
2 parents de9d23b + f126d55 commit 6ea1f92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ios/RCTMJRefreshHeader/RCTMJRefreshHeader/RCTMJScrollView.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,9 @@ - (void)setClipsToBounds:(BOOL)clipsToBounds
505505
- (void)dealloc
506506
{
507507
_scrollView.delegate = nil;
508-
[_eventDispatcher.bridge.uiManager.observerCoordinator removeObserver:self];
508+
if (_maintainVisibleContentPosition != nil) {
509+
[_eventDispatcher.bridge.uiManager.observerCoordinator removeObserver:self];
510+
}
509511
}
510512

511513
- (void)layoutSubviews

0 commit comments

Comments
 (0)