From e5cc79a40d78c1832617d19186ca87ee9877ebfa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Tue, 18 Feb 2014 11:50:00 +0100 Subject: [PATCH 1/1] smartxml: Document.transaction now returns value from a callback --- src/smartxml/smartxml.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 203bdb2..1e7fc21 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -582,9 +582,11 @@ $.extend(Document.prototype, Backbone.Events, { }, transaction: function(callback, context) { + var toret; this.startTransaction(); - callback.call(context); + toret = callback.call(context); this.endTransaction(); + return toret; }, getNodeByPath: function(path) { -- 2.20.1