-
Notifications
You must be signed in to change notification settings - Fork 35
Route match includes extra params #34
Copy link
Copy link
Open
Description
I am using qs to append arbitrary URL params to a route.
However when I match this back, it returns the additional params I added.
I would expect the below example to return { alertId: "456", id: "123" }
var route = new Route('/feeditems/:id?useralertId=:alertId')
var myEndpoint = route.reverse({ id: 123, alertId: 456 })
// Appending extra params with qs
myEndpoint += '&' + qs.stringify({ extraParam: 'value' }) // /feeditems/123?useralertId=456&extraParam=value
route.match('/feeditems/123?useralertId=456&extraParam=value')
/*
Returns
{
alertId: "456&extraParam=value",
id: "123"
}
*/Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels