Skip to content

Commit 015e0a1

Browse files
author
Guillaume Chau
committed
Fix SSR crash
1 parent bf068ce commit 015e0a1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/apollo-provider.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ export class ApolloProvider {
3535
for (let key in apolloOptions) {
3636
const options = apolloOptions[key]
3737
if (
38-
!options.query || (
39-
(typeof options.ssr === 'undefined' || options.ssr) &&
40-
(typeof options.prefetch !== 'undefined' && options.prefetch)
38+
key.charAt(0) !== '$' && (
39+
!options.query || (
40+
(typeof options.ssr === 'undefined' || options.ssr) &&
41+
(typeof options.prefetch !== 'undefined' && options.prefetch)
42+
)
4143
)
4244
) {
4345
this.willPrefetchQuery(options, options.client || componentClient)

0 commit comments

Comments
 (0)