浏览代码

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

Gareth Steyn 7 年前
父节点
当前提交
8cbb9477ce
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      ios/RCCManager.m

+ 1
- 1
ios/RCCManager.m 查看文件

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];