mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 10:20:59 +00:00
Fixed: Make sure we handle undefined when testing for nil values (#2862)
This commit is contained in:
1 parent
8daa53dd3e
commit
7dc77ed609
95 files changed
+280
-280
No files matched your search
@@ -151,7 +151,7 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
|
||||
var key = keys[index],
|
||||
value = [self valueForKey:key];
|
||||
|
||||
if (value === nil)
|
||||
if (value == nil)
|
||||
[dictionary setObject:[CPNull null] forKey:key];
|
||||
|
||||
else
|
||||
@@ -248,7 +248,7 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
|
||||
key,
|
||||
keyEnumerator = [keyedValues keyEnumerator];
|
||||
|
||||
while ((key = [keyEnumerator nextObject]) !== nil)
|
||||
while ((key = [keyEnumerator nextObject]) != nil)
|
||||
{
|
||||
value = [keyedValues objectForKey: key];
|
||||
|
||||
@@ -286,7 +286,7 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
|
||||
|
||||
- (void)setValue:(id)aValue forKey:(CPString)aKey
|
||||
{
|
||||
if (aValue !== nil)
|
||||
if (aValue != nil)
|
||||
[self setObject:aValue forKey:aKey];
|
||||
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user