Skip to content

Commit

Permalink
Merge pull request #503 from fdm1/bug-populateUrl-param-order
Browse files Browse the repository at this point in the history
fix: url helper not honoring params passed in
  • Loading branch information
jakobrosenberg authored Jan 24, 2023
2 parents 20fbd46 + 0866e1e commit b194c26
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(`:${key}`, value)
path = path.replace(new RegExp(`:${key}(\/|$)`), value)

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

0 comments on commit b194c26

Please sign in to comment.