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.
xxx=undefined
1 parent 4605681 commit 7c79fd4Copy full SHA for 7c79fd4
lib/core/utilities.js
@@ -17,10 +17,11 @@ export const parseQuery = queryString => {
17
}
18
19
export const encodeQuery = queryObject => {
20
- return Object.keys(queryObject)
+ return Object.entries(queryObject)
21
+ .filter(([key, value]) => typeof value !== 'undefined')
22
.map(
- key =>
23
- encodeURIComponent(key) + '=' + encodeURIComponent(queryObject[key])
+ ([key, value]) =>
24
+ encodeURIComponent(key) + (value != null ? '=' + encodeURIComponent(value) : '')
25
)
26
.join('&')
27
0 commit comments