Fixed: Make sure we handle undefined when testing for nil values (#2862)

This commit is contained in:
Martin Carlberg authored and GitHub committed 2020-01-31 13:43:58 +01:00
1 parent 8daa53dd3e
commit 7dc77ed609
95 files changed
+280 -280

No files matched your search

+2 -2
View File
@@ -384,7 +384,7 @@
*/
- (void)_selectionDidChange
{
if (_selection === undefined || _selection === nil)
if (_selection == nil)
_selection = [[CPControllerSelectionProxy alloc] initWithController:self];
[_selection controllerDidChange];
@@ -770,7 +770,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
}
}
if (value === nil || value.isa && [value isEqual:[CPNull null]])
if (value == nil || value.isa && [value isEqual:[CPNull null]])
value = CPNullMarker;
return value;