cacheable-request
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "cacheable-request", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Wrap native HTTP requests with RFC compliant cache support", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -38,4 +38,7 @@ 'use strict'; | ||
} else { | ||
const [pathname, ...search] = (opts.path || '').split('?'); | ||
url = normalizeUrlObject({ ...opts, pathname, search: search.join('?') }); | ||
const [pathname, ...searchParts] = (opts.path || '').split('?'); | ||
const search = searchParts.length > 0 ? | ||
`?${searchParts.join('?')}` : | ||
''; | ||
url = normalizeUrlObject({ ...opts, pathname, search }); | ||
} | ||
@@ -42,0 +45,0 @@ opts = { |
15309
190