From b451ccbade41c269c6623e83e3ba4fc89b7ba4ec Mon Sep 17 00:00:00 2001 From: BL Date: Wed, 5 Sep 2018 16:00:06 +0530 Subject: [PATCH] remove overuse of the toString() and correct variable naming convention --- lib/AmazonMwsResource.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/AmazonMwsResource.js b/lib/AmazonMwsResource.js index 1d5f4a2..e024734 100644 --- a/lib/AmazonMwsResource.js +++ b/lib/AmazonMwsResource.js @@ -255,8 +255,8 @@ AmazonMwsResource.prototype = { /** * https://github.com/ashtuchkin/iconv-lite/issues/32 */ - var str = iconv.decode(bufferString, 'win1251').toString(); - responseString = iconv.encode(str, charset).toString(); + var win1251String = iconv.decode(bufferString, 'win1251'); + responseString = iconv.encode(win1251String, charset); } catch (Exception) { debug('Exception iconv ', Exception); return callback.call(self, new Error.AmazonMwsAPIError({