Browse Source

Check if sharedBridge is valid instead of only checking for not null (#2584)

Gareth Steyn 6 years ago
parent
commit
8cbb9477ce
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      ios/RCCManager.m

+ 1
- 1
ios/RCCManager.m View File

140
 }
140
 }
141
 
141
 
142
 -(void)initBridgeWithBundleURL:(NSURL *)bundleURL launchOptions:(NSDictionary *)launchOptions {
142
 -(void)initBridgeWithBundleURL:(NSURL *)bundleURL launchOptions:(NSDictionary *)launchOptions {
143
-    if (self.sharedBridge) return;
143
+    if (self.sharedBridge && [self.sharedBridge isValid]) return;
144
     
144
     
145
     self.bundleURL = bundleURL;
145
     self.bundleURL = bundleURL;
146
     self.sharedBridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
146
     self.sharedBridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];