diff --git a/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m b/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m index c874b683..ec692a6c 100644 --- a/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m +++ b/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m @@ -144,8 +144,10 @@ - (void)initJSExecutor { __strong typeof(_self) self = _self; NSTimer *timer = [self.timers valueForKey:timerId]; if (timer) { - [timer invalidate]; [self.timers removeObjectForKey:timerId]; + dispatch_async(dispatch_get_main_queue(), ^{ + [timer invalidate]; + }); } }];