We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33b5ffc commit 1b12b0dCopy full SHA for 1b12b0d
packages/node_modules/pouchdb-adapter-http/src/index.js
@@ -134,9 +134,12 @@ function genUrl(opts, path) {
134
}
135
136
function paramsToStr(params) {
137
- return '?' + Object.keys(params).map(function (k) {
138
- return k + '=' + encodeURIComponent(params[k]);
139
- }).join('&');
+ const paramKeys = Object.keys(params);
+ if (paramKeys.length === 0) {
+ return '';
140
+ }
141
+
142
+ return '?' + paramKeys.map(key => key + '=' + encodeURIComponent(params[key])).join('&');
143
144
145
function shouldCacheBust(opts) {
0 commit comments