mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-29 11:28:49 +00:00
In CPUndoManager, handle the edge cases if an object changes from being an Objective-J object to being just a JS object. Also handle the case where an Objective-J object could theoretically compare equal to nil - CPNull isEqual:.
This commit is contained in:
1 parent
c807358216
commit
f2c01cbbbd
1 file changed
+1
-1
@@ -729,7 +729,7 @@ if (_currentGroup == nil)
|
||||
// Don't add no-ops to the undo stack.
|
||||
var before = [aChange valueForKey:CPKeyValueChangeOldKey],
|
||||
after = [aChange valueForKey:CPKeyValueChangeNewKey];
|
||||
if (before === after || (after !== nil && after.isa && [before isEqual:after]))
|
||||
if (before === after || (before !== nil && before.isa && (after === nil || after.isa) && [before isEqual:after]))
|
||||
return;
|
||||
|
||||
[[self prepareWithInvocationTarget:anObject]
|
||||
|
||||
Reference in new issue
Block a user