mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 07:59:27 +00:00
Fixed wrong assertion in index check preventing the first deletion of fist custom attribute (fixes #911)
This commit is contained in:
@@ -201,7 +201,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
||||
}
|
||||
- (void)removeCustomField:(id)sender {
|
||||
NSInteger rowIndex = [self.customFieldsTableView rowForView:sender];
|
||||
NSAssert(rowIndex > 0 && rowIndex < self.representedEntry.customAttributes.count, @"Invalid custom attribute index.");
|
||||
NSAssert(rowIndex >= 0 && rowIndex < self.representedEntry.customAttributes.count, @"Invalid custom attribute index.");
|
||||
KPKAttribute *attribute = self.representedEntry.customAttributes[rowIndex];
|
||||
[self.observer willChangeModelProperty];
|
||||
[self.representedEntry removeCustomAttribute:attribute];
|
||||
|
||||
Reference in New Issue
Block a user