Fix key-check in the Ordered Dictionary class

This commit is contained in:
iska
2015-03-30 23:32:15 +02:00
parent 880f36ee05
commit 0535cdbbb3
+1 -1
View File
@@ -57,7 +57,7 @@
- (void)setObject:(id)anObject forKey:(id<NSCopying>)aKey
{
if (_dictionary[aKey] != nil) {
if (_dictionary[aKey] == nil) {
[_keys addObject:aKey];
}
_dictionary[aKey] = anObject;