fix: don't add default client if not defined, closes #548

This commit is contained in:
Guillaume Chau
2019-09-30 14:48:44 +02:00
parent 578cb9f8d3
commit 970dc2b6a5
+3 -1
View File
@@ -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