Remove calls to [super observe] to fix crash

This commit is contained in:
Zaid Daghestani 2019-07-01 14:56:41 -07:00 committed by GitHub
parent 3a7be63de3
commit 6de06f1f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -595,8 +595,7 @@ static int const RCTVideoUnset = -1;
} }
return; return;
} else }
return [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
} }
if([keyPath isEqualToString:readyForDisplayKeyPath] && [change objectForKey:NSKeyValueChangeNewKey] && self.onReadyForDisplay) { if([keyPath isEqualToString:readyForDisplayKeyPath] && [change objectForKey:NSKeyValueChangeNewKey] && self.onReadyForDisplay) {
self.onReadyForDisplay(@{@"target": self.reactTag}); self.onReadyForDisplay(@{@"target": self.reactTag});
@ -713,8 +712,6 @@ static int const RCTVideoUnset = -1;
@"target": self.reactTag}); @"target": self.reactTag});
} }
} }
} else {
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
} }
} }