1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

chore: use arrow functions

This commit is contained in:
Ruben Bridgewater
2017-05-26 10:37:38 +02:00
parent 55fb67adaf
commit 54671f6c52
5 changed files with 84 additions and 125 deletions

View File

@@ -101,9 +101,8 @@ Multi.prototype.execTransaction = function execTransaction () {
const main = this._client.internalSendCommand(new Command('exec', []))
this._client.uncork()
const self = this
return Promise.all(promises).then(() => main.then((replies) => multiCallback(self, replies)).catch((err) => {
err.errors = self.errors
return Promise.all(promises).then(() => main.then((replies) => multiCallback(this, replies)).catch((err) => {
err.errors = this.errors
return Promise.reject(err)
}))
}