fix: call loading watchers when smart query is destroyed and was loading

This commit is contained in:
Guillaume Chau
2018-06-14 01:22:42 +02:00
parent b52e9e07bd
commit 7267dc4182
+9
View File
@@ -258,4 +258,13 @@ export default class SmartQuery extends SmartApollo {
return this.observer.stopPolling(...args)
}
}
destroy () {
super.destroy()
if (this.loading) {
this.watchLoading(false, -1)
}
this.loading = false
}
}