mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-12 19:59:03 +08:00
fixed bug with changed()
This commit is contained in:
@@ -580,9 +580,13 @@ Collection.prototype.save = function (ctx, fn) {
|
||||
}
|
||||
if(err) return done(err);
|
||||
|
||||
// copy previous obj
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
prev[key] = obj[key];
|
||||
});
|
||||
|
||||
// merge changes
|
||||
Object.keys(item).forEach(function (key) {
|
||||
prev[key] = obj[key];
|
||||
obj[key] = item[key];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user