Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 2920831

Browse files
committed
fix for null query params being transmitted as empty strings; this was preventing the use of nulls in list method filters
1 parent ac5e0c1 commit 2920831

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/request.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ var superagent = require('superagent');
66
var FSLASH = '/';
77

88
function objectToQueryString(obj) {
9+
// Convert null query params to 'null'
10+
for (var param in obj) {
11+
if (obj[param] === null) {
12+
obj[param] = 'null';
13+
}
14+
}
915
return qs.stringify(obj, { encode: true });
1016
}
1117

0 commit comments

Comments
 (0)