From 342e1f730ece3668a2075119e37708866ad4812c Mon Sep 17 00:00:00 2001 From: DJ Shamblin Date: Wed, 16 Jan 2019 13:04:41 -0800 Subject: [PATCH] fix superagent double callback bug by removing request.end function --- src/ApiClient.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/ApiClient.js b/src/ApiClient.js index 60023792..4278e80c 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -533,23 +533,6 @@ } } - request.end(function (error, response) { - if (callback) { - var data = null; - if (!error) { - try { - data = _this.deserialize(response, returnType); - if (_this.enableCookies && typeof window === 'undefined') { - _this.agent.saveCookies(response); - } - } catch (err) { - error = err; - } - } - callback(error, data, response); - } - }); - return request; };