From eba0261082a8e77516c1164d9716203d86dc7193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Fri, 19 Mar 2021 10:12:14 +0800 Subject: [PATCH] fix inconsistency due to itemcount change --- doric-iOS/Pod/Classes/Shader/DoricListNode.m | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricListNode.m b/doric-iOS/Pod/Classes/Shader/DoricListNode.m index 16b44bca..d5b0a09f 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricListNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricListNode.m @@ -228,7 +228,12 @@ - (void)blendSubNode:(NSDictionary *)subModel { return; } NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[key integerValue] inSection:0]; - [self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; + @try { + [self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; + } + @catch(id exception) { + [self.doricContext.driver.registry onException:exception inContext:self.doricContext]; + } }]; } }]; @@ -252,7 +257,12 @@ - (void)callItem:(NSUInteger)position height:(CGFloat)height { return; } NSIndexPath *indexPath = [NSIndexPath indexPathForRow:position inSection:0]; - [self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; + @try { + [self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; + } + @catch(id exception) { + [self.doricContext.driver.registry onException:exception inContext:self.doricContext]; + } }]; }); } else {