Hi! Thank for your great work once again! I wonder if you can help me.
Description
I'm using generated javascript client in my project and I've met a bug, I suppose.
If my API returns an empty array client is returning it to me as a string and fails with message:
TypeError: data.map is not a function
It occurs in src/ApiClient.js:exports.convertToType()
} else if (Array.isArray(type)) {
// for array type like: ['String']
var itemType = type[0];
return data.map(function(item) {
return exports.convertToType(item, itemType);
});
} else if (typeof type === 'object') {
I suppose this data is handled somewhere in exports.prototype.deserialize
Because of
if (data == null || !Object.keys(data).length) {
// SuperAgent does not always produce a body; use the unparsed response as a fallback
data = response.text;
}
Can you help me?
Hi! Thank for your great work once again! I wonder if you can help me.
Description
I'm using generated javascript client in my project and I've met a bug, I suppose.
If my API returns an empty array client is returning it to me as a string and fails with message:
It occurs in
src/ApiClient.js:exports.convertToType()I suppose this data is handled somewhere in
exports.prototype.deserializeBecause of
Can you help me?