File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -103,16 +103,19 @@ export class ApolloProvider {
103103 result = prefetch
104104 }
105105
106- const optVariables = queryOptions . variables
107-
108106 if ( ! result ) {
109107 return Promise . resolve ( )
110- } else if ( prefetchType === 'boolean' && typeof optVariables !== 'undefined' ) {
111- // Reuse `variables` option with `prefetch: true`
112- if ( typeof optVariables === 'function' ) {
113- variables = optVariables . call ( context )
108+ } else if ( prefetchType === 'boolean' ) {
109+ const optVariables = queryOptions . variables
110+ if ( typeof optVariables !== 'undefined' ) {
111+ // Reuse `variables` option with `prefetch: true`
112+ if ( typeof optVariables === 'function' ) {
113+ variables = optVariables . call ( context )
114+ } else {
115+ variables = optVariables
116+ }
114117 } else {
115- variables = optVariables
118+ variables = undefined
116119 }
117120 } else {
118121 variables = result
You can’t perform that action at this time.
0 commit comments