iOS: optimize hot reload operation which causes render error
This commit is contained in:
@@ -41,7 +41,7 @@ - (instancetype)initWithContext:(DoricContext *)context callbackId:(NSString *)c
|
||||
|
||||
- (void)resolve:(id)result {
|
||||
__weak typeof(self) __self = self;
|
||||
if (self.context == nil) {
|
||||
if (self.context == nil || self.context.destroyed) {
|
||||
return;
|
||||
}
|
||||
[[self.context.driver invokeDoricMethod:DORIC_BRIDGE_RESOLVE
|
||||
@@ -58,7 +58,7 @@ - (void)resolve:(id)result {
|
||||
|
||||
- (void)reject:(id)result {
|
||||
__weak typeof(self) __self = self;
|
||||
if (self.context == nil) {
|
||||
if (self.context == nil || self.context.destroyed) {
|
||||
return;
|
||||
}
|
||||
[[self.context.driver invokeDoricMethod:DORIC_BRIDGE_REJECT
|
||||
|
Reference in New Issue
Block a user