Skip to content

Commit

Permalink
fix(useRouteQuery): unset route query on default value (#1490)
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Apr 14, 2022
1 parent a9c800d commit c1459ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/router/useRouteQuery/index.ts
Expand Up @@ -25,7 +25,7 @@ export function useRouteQuery<T extends string | string[]>(
},
set(v) {
nextTick(() => {
router[unref(mode)]({ query: { ...route.query, [name]: v } })
router[unref(mode)]({ query: { ...route.query, [name]: v === defaultValue || v === null ? undefined : v } })
})
},
})
Expand Down

0 comments on commit c1459ed

Please sign in to comment.