if(!this._currentTransaction) {
return this.transaction(function() {
return this.transform(Transformation, args);
- }, this);
+ }, {context: this});
}
if(typeof Transformation === 'function') {
this.replaceRoot(this._rollbackBackup);
this._rollbackBackup = null;
this._currentTransaction = null;
+ this._transformationLevel = 0;
},
transaction: function(callback, params) {
return;
}
this.endTransaction();
+ if(params.success) {
+ params.success(toret);
+ }
return toret;
},