Skip to content

Commit 5c7e471

Browse files
author
Denis Rechkunov
committed
Stringify all value of data object.
1 parent b244b46 commit 5c7e471

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/UHRBase.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ UHRBase.prototype._getDataToSend = function (headers, data) {
302302
};
303303
}
304304

305+
Object.keys(data)
306+
.forEach(function (key) {
307+
data[key] = data[key] !== undefined ?
308+
String(data[key]) : data[key];
309+
});
310+
305311
if (contentType === UHRBase.TYPES.JSON) {
306312
return {
307313
headers: headers,

0 commit comments

Comments
 (0)