From f51c5bf547503b3981e727d3121af9f32d4c0f06 Mon Sep 17 00:00:00 2001 From: ArnaudBuchholz Date: Fri, 17 Aug 2018 09:46:36 -0400 Subject: [PATCH] Simplify code (#279) --- src/interfaces/promisify.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/promisify.js b/src/interfaces/promisify.js index a5f5dc70..833a9542 100644 --- a/src/interfaces/promisify.js +++ b/src/interfaces/promisify.js @@ -17,9 +17,9 @@ function _gpfInterfacesWrap (iInterfaceImpl, interfaceSpecifier, promise) { _gpfObjectForEach(interfaceSpecifier.prototype, function (referenceMethod, name) { promise[name] = function () { var args = arguments; - return _gpfInterfacesWrap(iInterfaceImpl, interfaceSpecifier, promise.then(function () { + return promise.then(function () { return _gpfPromisify(iInterfaceImpl[name].apply(iInterfaceImpl, args)); - })); + }); }; }); return promise;