Open
Description
Vue.js / vue-router versions
2.1.1
Steps to reproduce
- Create a route that uses a "zero or more" operator:
'/directions/:itineraryItems(.*)*'
- Access this route with a matching URL:
/directions/origin/destination
- Access this route programmatically:
router.push({
name: 'directions',
params: {
itineraryItems: ['origin', 'destination']
}
})
What is Expected?
The parsed itineraryItems route param is an array containing 'origin' and 'destination'.
What is actually happening?
The parsed itineraryItems route param is a string with the value 'origin/destination' if the URL is accessed directly.
The parsed itineraryItems route param is an array containing 'origin' and 'destination' if accessed programmatically.
This means the same URL can have its params as an array or as a string, depending on how it was created.