Merge pull request #74 from manukall/fix_watch_loading_when_no_new_results_are_returned
fix refetch + watchLoading when no new results are returned
This commit is contained in:
+5
-1
@@ -268,7 +268,11 @@ export class SmartQuery extends SmartApollo {
|
||||
refetch (variables) {
|
||||
variables && (this.options.variables = variables)
|
||||
if (this.observer) {
|
||||
const result = this.observer.refetch(variables)
|
||||
const result = this.observer.refetch(variables).then((result) => {
|
||||
if (!result.loading) {
|
||||
this.loadingDone()
|
||||
}
|
||||
})
|
||||
this.maySetLoading()
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user