Skip to content

Commit 3a3d884

Browse files
douglowderfacebook-github-bot
authored andcommittedFeb 16, 2018
tvOS: TV nav event emitter should check for bridge
Summary: When running with the packager in the tvOS simulator, reloading from the packager hits an assert in `RCTEventEmitter`, causing a crash. The solution is for `RCTTVNavigationEventEmitter` to check for the existence of the bridge before attempting to send an event. Manual testing. [IOS] [BUGFIX] [RCTTVNavigationEventEmitter.m] - Fix crash when reloading in tvOS Closes #17797 Differential Revision: D7014975 Pulled By: hramos fbshipit-source-id: 0bf766e87267ca8592ff0cc0b3cb4621a8e8f9b5
1 parent 2123108 commit 3a3d884

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎React/Modules/RCTTVNavigationEventEmitter.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ - (void)dealloc
4646

4747
- (void)handleTVNavigationEventNotification:(NSNotification *)notif
4848
{
49-
[self sendEventWithName:TVNavigationEventName body:notif.object];
49+
if (self.bridge) {
50+
[self sendEventWithName:TVNavigationEventName body:notif.object];
51+
}
5052
}
5153

5254
@end

0 commit comments

Comments
 (0)
Please sign in to comment.