SmartSubscription: bind updateQuery to vm - fix #154

This commit is contained in:
Guillaume Chau
2018-02-12 16:42:38 +01:00
parent 164b7bb9de
commit c8ab8dbfb3
+4
View File
@@ -24,6 +24,10 @@ export default class SmartSubscription extends SmartApollo {
const apolloOptions = this.generateApolloOptions(variables)
if (typeof apolloOptions.updateQuery === 'function') {
apolloOptions.updateQuery = apolloOptions.updateQuery.bind(this.vm)
}
if (this.options.linkedQuery) {
this.sub = this.options.linkedQuery.subscribeToMore(apolloOptions)
} else {