Skip to content

Commit

Permalink
fix a crash when launching the app
Browse files Browse the repository at this point in the history
fix the issue that sometimes when using the debug mode _bridge is nil and is throwing an exception.
  • Loading branch information
liulianci committed Jan 2, 2020
1 parent a6a9bb1 commit 3675ccf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ios/ElectrodeReactNativeBridge/ElectrodeBridgeTransceiver.m
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ - (nullable ElectrodeBridgeEventListener)removeEventListnerWithUUID: (NSUUID *)

- (void)emitMessage:(ElectrodeBridgeMessage *_Nonnull)bridgeMessage {
ERNDebug(@"Sending bridgeMessage(%@) to JS", bridgeMessage);
[self sendEventWithName:@"electrode.bridge.message"
body:[bridgeMessage toDictionary]];
[sharedInstance sendEventWithName:@"electrode.bridge.message" body:[bridgeMessage toDictionary]];
}

- (void)notifyReactNativeEventListenerWithEvent:(ElectrodeBridgeEvent *)event {
Expand Down

0 comments on commit 3675ccf

Please sign in to comment.