-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
When calling GetServiceStatus for the Orders API I get "Cannot read property 'list' of undefined" errors.
Looking through the code it would appear that /lib/request.js is checking for param.list when there isn't a param object.
I implemented a quick fix to check if param exists before trying to check if it has properties and executing this block of code. "if (param){" . This fixes the immediate error but I haven't had time to check if this is quite the right place to do this. Maybe the /lib/sections should define an empty params on GetServiceStatus ?
Here is the complete change, line 152 in /lib/request.js
// Lists need to be sequentially numbered and we take care of that here
if (param) {
if (param.list) {
const values = _.map(toCollection(value), getValue);
_.forEach(values, (value, i) => {
this.values[`${param.name}.${i + 1}`] = value;
});
} else {
this.values[param.name] = getValue(value);
}
}Quite happy to do a pull request if this is ok
Metadata
Metadata
Assignees
Labels
No labels