mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-29 02:50:10 +00:00
started work on patch(..)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
bd61727b12
commit
f4f174de81
4
diff.js
4
diff.js
@ -1074,8 +1074,7 @@ var _patch = function(diff, obj){
|
||||
var NONE = diff.options.placeholders.NONE
|
||||
var EMPTY = diff.options.placeholders.EMPTY
|
||||
|
||||
diff.diff
|
||||
.forEach(function(change){
|
||||
Types.walk(diff, function(change){
|
||||
// replace the object itself...
|
||||
if(path.length == 0){
|
||||
return change.B
|
||||
@ -1096,6 +1095,7 @@ var _patch = function(diff, obj){
|
||||
delete target[key]
|
||||
|
||||
} else {
|
||||
// XXX also check what is overwritten...
|
||||
target[key] = change.B
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user