Skip to content

Commit f926443

Browse files
committed
Better loading state handling
1 parent f6a3600 commit f926443

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/smart-apollo.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,12 @@ export class SmartQuery extends SmartApollo {
205205
super.executeApollo(variables)
206206
}
207207

208-
nextResult ({ data }) {
209-
this.loadingDone()
208+
nextResult (result) {
209+
const { data, loading } = result
210+
211+
if (!loading) {
212+
this.loadingDone()
213+
}
210214

211215
if (typeof data === 'undefined') {
212216
// No result

0 commit comments

Comments
 (0)