This commit is contained in:
Isiah Meadows 2019-07-03 14:41:48 -04:00 committed by GitHub
parent ddc8adbbd3
commit 86d64e213f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -33,7 +33,7 @@ module.exports = function(template, params) {
var newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex
var result = resolved.slice(0, newPathEnd)
if (queryIndex >= 0) result += "?" + template.slice(queryIndex, queryEnd)
if (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)
if (newQueryIndex >= 0) result += (queryIndex < 0 ? "?" : "&") + resolved.slice(newQueryIndex, newQueryEnd)
var querystring = buildQueryString(query)
if (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? "?" : "&") + querystring