Fixed: constructing a 'RowCountChanged' notification generates a nil warning when dragging a row

Previously, when

- Dragging a row in the rule editor

would eventually try to generate a dictionary with key 'indexes' and a
nil value in the method __postRowCountChangedNotificationOfType:indexes:.
Generating an empty dictionary instead when there is no indexes solves
this issue.
This commit is contained in:
Kjell Nilsson committed 2013-03-26 11:19:44 +01:00
1 parent 2a580c675a
commit d9e7912162
1 file changed
+1 -1
+1 -1
View File
@@ -2279,7 +2279,7 @@ TODO: implement
- (void)_postRowCountChangedNotificationOfType:(CPString)notificationName indexes:indexes
{
var userInfo = @{ "indexes": indexes };
var userInfo = indexes === nil ? @{} : @{ "indexes": indexes };
[[CPNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:userInfo];
}