From 12c3cf53dbc8833b40f5e854f3615f167c4f21a4 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Thu, 23 Jul 2015 22:25:28 +0500 Subject: [PATCH] Remove unnecessary variable --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index fb44c80..fa838bb 100644 --- a/index.js +++ b/index.js @@ -114,7 +114,7 @@ function asCallback(opts, cb) { } function asPromise(opts) { - var promise = new pinkiePromise(function (resolve, reject) { + return new pinkiePromise(function (resolve, reject) { asCallback(opts, function (err, data, response) { response.body = data; @@ -127,8 +127,6 @@ function asPromise(opts) { resolve(response); }); }); - - return promise; } function asStream(opts) {