Skip to content

Commit

Permalink
chore: eslint reports an unused type assertion here
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo committed Oct 12, 2024
1 parent 8e4a340 commit c48a77f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/vue-query/src/useMutationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,9 @@ export function useMutationState<TResult = MutationState>(
): Readonly<Ref<Array<TResult>>> {
const filters = computed(() => cloneDeepUnref(options.filters))
const mutationCache = (queryClient || useQueryClient()).getMutationCache()
const state = shallowRef(getResult(mutationCache, options)) as Ref<
Array<TResult>
>
const state = shallowRef(getResult(mutationCache, options))
const unsubscribe = mutationCache.subscribe(() => {
const result = getResult(mutationCache, options)
state.value = result
state.value = getResult(mutationCache, options)
})

watch(filters, () => {
Expand Down

0 comments on commit c48a77f

Please sign in to comment.