Sfoglia il codice sorgente

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

Gareth Steyn 6 anni fa
parent
commit
8cbb9477ce
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      ios/RCCManager.m

+ 1
- 1
ios/RCCManager.m Vedi File

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