Skip to content

Commit

Permalink
NSUserDefaults: Change notification should contain old value from oth…
Browse files Browse the repository at this point in the history
…er domains aswell
  • Loading branch information
hmelder committed Oct 15, 2024
1 parent e6c9108 commit ef9781f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/NSUserDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,8 @@ - (void) setObject: (id)value forKey: (NSString*)defaultName
[_persDomains setObject: pd forKey: processName];
RELEASE(pd);
}
old = [pd objectForKey: defaultName];
// Make sure to search all domains and not only the process domain
old = [self objectForKey: defaultName];
if ([pd setObject: value forKey: defaultName])
{
[self _changePersistentDomain: processName];
Expand Down

0 comments on commit ef9781f

Please sign in to comment.