vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.77k stars 1.16k forks source link

fix: null should be preserved in relative navigations #2083

Open posva opened 7 months ago

posva commented 7 months ago

The fix is a bit more complicated that I anticipated, I will come back to this later on as the currently documented version works perfectly.

Ideally, I would make the matcher a bit more permissive so the encoding is kept at the router level. I think the matcher sholud be responsible for removing the nullish parameters but that also means the encode function should leave nullish values untouched. We might need an intermediate Type for this shape of Params, it gets a little bit tedious in terms of types, so I would like to avoid adding more types.

Close #1893

netlify[bot] commented 7 months ago

Deploy Preview for vue-router canceled.

Name Link
Latest commit c93e259e39a96117439aa02c351b625e780e4a90
Latest deploy log https://app.netlify.com/sites/vue-router/deploys/657c61c42737a50008e91f69