Skip to content

Commit

Permalink
fix: avoid onServerPrefetch warning (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikklein authored May 3, 2022
1 parent 99c442b commit cf89b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-apollo-composable/src/useQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export function useQueryImpl<
// SSR
let firstResolve: (() => void) | undefined
let firstReject: ((apolloError: ApolloError) => void) | undefined
onServerPrefetch?.(() => {
vm && onServerPrefetch?.(() => {
if (!isEnabled.value || (isServer && currentOptions.value?.prefetch === false)) return

return new Promise<void>((resolve, reject) => {
Expand Down

0 comments on commit cf89b25

Please sign in to comment.