From 970dc2b6a52e30beb1729d43e0f6f2421833aa2d Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Mon, 30 Sep 2019 14:48:44 +0200 Subject: [PATCH] fix: don't add default client if not defined, closes #548 --- src/apollo-provider.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apollo-provider.js b/src/apollo-provider.js index 45a6fd16..5799c6b6 100644 --- a/src/apollo-provider.js +++ b/src/apollo-provider.js @@ -4,7 +4,9 @@ export class ApolloProvider { throw new Error('Options argument required') } this.clients = options.clients || {} - this.clients.defaultClient = this.defaultClient = options.defaultClient + if (options.defaultClient) { + this.clients.defaultClient = this.defaultClient = options.defaultClient + } this.defaultOptions = options.defaultOptions this.watchLoading = options.watchLoading this.errorHandler = options.errorHandler