This commit is contained in:
Antonio Scandurra
2015-11-11 09:58:07 +01:00
parent 68ea20a705
commit c85088fb46

View File

@@ -690,11 +690,10 @@ class Config
# rejected {Promise} will be returned instead.
transactAsync: (callback) ->
@beginTransaction()
endTransaction = (resolveOrReject) => (args...) =>
@endTransaction()
resolveOrReject(args...)
try
endTransaction = (fn) => (args...) =>
@endTransaction()
fn(args...)
result = callback()
new Promise (resolve, reject) =>
result