bajo-extra 1.1.8 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin/factory.js +4 -1
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -254,7 +254,7 @@ async function factory (pkgName) {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
fetchUrl = async (url, opts = {}, extra = {}) => {
|
|
257
|
-
const { isSet } = this.
|
|
257
|
+
const { isSet } = this.lib.aneka
|
|
258
258
|
const { fs } = this.lib
|
|
259
259
|
const { isEmpty, has, isArray, isPlainObject, isString, cloneDeep, merge } = this.lib._
|
|
260
260
|
if (isPlainObject(url)) {
|
|
@@ -269,6 +269,9 @@ async function factory (pkgName) {
|
|
|
269
269
|
delete opts.auth
|
|
270
270
|
}
|
|
271
271
|
const query = merge({}, opts.query, opts.params ?? {})
|
|
272
|
+
for (const q in query) {
|
|
273
|
+
if (!isSet(query[q])) delete query[q]
|
|
274
|
+
}
|
|
272
275
|
if (!isEmpty(query)) opts.query = query
|
|
273
276
|
delete opts.params
|
|
274
277
|
if (!has(extra, 'cacheBuster')) extra.cacheBuster = true
|