fixed: fromObject:(id)object index:(id)anIndex failed to raise if argument was not CPDictionary or CPArray

This commit is contained in:
daboe01
2018-02-24 15:41:17 +01:00
parent ad7c88fb45
commit 8550abadef
@@ -220,7 +220,7 @@ var CPSelectorNameKey = @"CPSelectorName",
{
if ([object isKindOfClass:[CPDictionary class]])
return [object objectForKey:anIndex];
else ([object isKindOfClass:[CPArray class]])
else if ([object isKindOfClass:[CPArray class]])
return [object objectAtIndex:anIndex];
[CPException raise:CPInvalidArgumentException reason:@"object[#] requires a CPDictionary or CPArray"];