Merge pull request #374 from strongloop/fix-conflict-resolution
[2.0] Fix conflict resolution
This commit is contained in:
commit
b24d1e942b
|
@ -154,6 +154,8 @@ app.model = function (Model, config) {
|
||||||
|
|
||||||
if (isPublic && Model.sharedClass) {
|
if (isPublic && Model.sharedClass) {
|
||||||
this.remotes().addClass(Model.sharedClass);
|
this.remotes().addClass(Model.sharedClass);
|
||||||
|
if (Model.settings.trackChanges && Model.Change)
|
||||||
|
this.remotes().addClass(Model.Change.sharedClass);
|
||||||
clearHandlerCache(this);
|
clearHandlerCache(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -609,7 +609,7 @@ Conflict.prototype.changes = function(cb) {
|
||||||
Conflict.prototype.resolve = function(cb) {
|
Conflict.prototype.resolve = function(cb) {
|
||||||
var conflict = this;
|
var conflict = this;
|
||||||
conflict.changes(function(err, sourceChange, targetChange) {
|
conflict.changes(function(err, sourceChange, targetChange) {
|
||||||
if(err) return callback(err);
|
if(err) return cb(err);
|
||||||
sourceChange.prev = targetChange.rev;
|
sourceChange.prev = targetChange.rev;
|
||||||
sourceChange.save(cb);
|
sourceChange.save(cb);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue