Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[iOS] Fix devtool unloading bridge manager. (#2520)
Browse files Browse the repository at this point in the history
  • Loading branch information
wqyfavor authored and jianhan-he committed Jun 6, 2019
1 parent 6cd5788 commit 181bca5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ios/sdk/WeexSDK/Sources/Manager/WXSDKManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ - (instancetype)init

+ (WXBridgeManager *)bridgeMgr
{
return [self sharedInstance].bridgeMgr;
WXBridgeManager* result = [self sharedInstance].bridgeMgr;
if (result == nil) {
// devtool may invoke "unload" and set bridgeMgr to nil
result = [[WXBridgeManager alloc] init];
[self sharedInstance].bridgeMgr = result;
}
return result;
}

+ (id)instanceForID:(NSString *)identifier
Expand Down

0 comments on commit 181bca5

Please sign in to comment.