You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An optional param is resolved as an empty string not as undefined. Because of this, userRouteParams('param', 'default') won't return default but an empty string.
Setting a default value if param is missing is useless, when optional parameters are always empty string.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
An optional param is resolved as an empty string not as undefined. Because of this,
userRouteParams('param', 'default')
won't returndefault
but an empty string.Setting a default value if param is missing is useless, when optional parameters are always empty string.
Reproduction
https://stackblitz.com/edit/vitejs-vite-157rjb
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: