fix iOS crash when call Destory
This commit is contained in:
@@ -35,7 +35,9 @@ - (void)render:(NSDictionary *)argument withPromise:(DoricPromise *)promise {
|
||||
__weak typeof(self) _self = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
__strong typeof(_self) self = _self;
|
||||
|
||||
if (self.doricContext == nil) {
|
||||
return;
|
||||
}
|
||||
NSString *viewId = argument[@"id"];
|
||||
|
||||
if (self.doricContext.rootNode.viewId == nil && [@"Root" isEqualToString:argument[@"type"]]) {
|
||||
@@ -53,6 +55,9 @@ - (void)render:(NSDictionary *)argument withPromise:(DoricPromise *)promise {
|
||||
|
||||
- (void)command:(NSDictionary *)argument withPromise:(DoricPromise *)promise {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (self.doricContext == nil) {
|
||||
return;
|
||||
}
|
||||
NSArray *viewIds = argument[@"viewIds"];
|
||||
id args = argument[@"args"];
|
||||
NSString *name = argument[@"name"];
|
||||
|
Reference in New Issue
Block a user