Skip to content

Commit

Permalink
Merge pull request #504 from fdm1/fix-url-param-with-slash
Browse files Browse the repository at this point in the history
Fix populateUrl with param before a slash
  • Loading branch information
jakobrosenberg authored Jan 25, 2023
2 parents b194c26 + b70380c commit 824ddfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function populateUrl(path, params, inheritedParams) {
const queryString = getQueryString(path, params)

for (const [key, value] of Object.entries(allParams))
path = path.replace(new RegExp(`:${key}(\/|$)`), value)
path = path.replace(new RegExp(`:${key}(\/|$)`), value + "$1")

return `${path}${queryString}`
}
Expand Down

0 comments on commit 824ddfb

Please sign in to comment.