Skip to content

Commit

Permalink
Merge pull request #345 from PrefectHQ/query-param-reactivity-fix
Browse files Browse the repository at this point in the history
Fix useRouteQuery reactivity
  • Loading branch information
pleek91 authored Nov 15, 2023
2 parents 3731547 + 81cf010 commit b2bc614
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/useRouteQuery/useRouteQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ function factory(): () => UseRouteQuery {
let interval: ReturnType<typeof setTimeout>

const update = async (): Promise<void> => {
const operationsToApply = operations.splice(0)
const query = applyQueryOperations(route.query, operationsToApply)
const query = applyQueryOperations(route.query, operations)

await router.push({ query })

operations.splice(0)
}

watch(operations, () => {
Expand Down

0 comments on commit b2bc614

Please sign in to comment.