From bc5b4f0527f81e97269611dc51901f8f1776ddfd Mon Sep 17 00:00:00 2001 From: Algirdas Gr Date: Mon, 13 Jun 2016 12:41:09 +0300 Subject: [PATCH] Fixes warning "a promise was created but was not returned" in more places @teh-botol noticed more places where warning is displayed. --- src/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transaction.js b/src/transaction.js index 8d957bad..c9c65f92 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -46,10 +46,10 @@ function Transaction(client, container, config, outerTx) { } if (result && result.then && typeof result.then === 'function') { result.then((val) => { - transactor.commit(val) + return transactor.commit(val) }) .catch((err) => { - transactor.rollback(err) + return transactor.rollback(err) }) } return null;