We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8f9f30 commit a9dffa3Copy full SHA for a9dffa3
src/smart-query.js
@@ -45,13 +45,13 @@ export default class SmartQuery extends SmartApollo {
45
}
46
47
get loading () {
48
- return this.vm.$data.$apolloData ? this.vm.$data.$apolloData.queries[this.key].loading : this._loading
+ return this.vm.$data.$apolloData && this.vm.$data.$apolloData.queries[this.key] ? this.vm.$data.$apolloData.queries[this.key].loading : this._loading
49
50
51
set loading (value) {
52
if (this._loading !== value) {
53
this._loading = value
54
- if (this.vm.$data.$apolloData) {
+ if (this.vm.$data.$apolloData && this.vm.$data.$apolloData.queries[this.key]) {
55
this.vm.$data.$apolloData.queries[this.key].loading = value
56
this.vm.$data.$apolloData.loading += value ? 1 : -1
57
0 commit comments