We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b778f2b commit 7faa2b3Copy full SHA for 7faa2b3
lib/utils.js
@@ -52,16 +52,16 @@ var prepareValue = function(val) {
52
if(val instanceof Date) {
53
return dateToString(val);
54
}
55
- if(typeof val === 'undefined') {
56
- return null;
57
- }
58
if(Array.isArray(val)) {
59
return arrayString(val);
60
61
- if(!val || typeof val !== 'object') {
62
- return val === null ? null : val.toString();
+ if(val === null || typeof val === 'undefined') {
+ return null;
+ }
+ if(typeof val === 'object') {
+ return JSON.stringify(val);
63
64
- return JSON.stringify(val);
+ return val.toString();
65
};
66
67
function dateToString(date) {
0 commit comments