iOS: fix crash when flowlayout in wrong state

This commit is contained in:
pengfei.zhou 2023-07-26 10:20:18 +08:00 committed by jingpeng
parent f1e3ef5e6b
commit 7ed8947671

View File

@ -377,7 +377,10 @@ - (NSDictionary *)itemModelAt:(NSUInteger)position {
NSUInteger pos = position + idx; NSUInteger pos = position + idx;
self.itemViewIds[@(pos)] = thisViewId; self.itemViewIds[@(pos)] = thisViewId;
}]; }];
return array[0]; if (array.count > 0 ) {
return array[0];
}
return nil;
} }
} }