Skip to content

Commit f330cee

Browse files
author
Bhushankumar L
authored
Merge pull request #114 from tylerreece22/bug-fix-csv-issue
Added small check to fix csv when response from amazon does not start with headers
2 parents d4d6ac3 + 244e642 commit f330cee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/AmazonMwsResource.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ AmazonMwsResource.prototype = {
168168
ignoreEmpty: true,
169169
trim: true
170170
};
171+
172+
if (responseString.includes('\n\n')) {
173+
responseString = responseString.split('\n\n')[1];
174+
}
175+
171176
csv.fromString(responseString, options)
172177
.on('data', function (value) {
173178
data.push(value);

0 commit comments

Comments
 (0)