From 7267dc4182edf323f37201770e76af24eaee4257 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Thu, 14 Jun 2018 01:22:42 +0200 Subject: [PATCH] fix: call loading watchers when smart query is destroyed and was loading --- src/smart-query.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/smart-query.js b/src/smart-query.js index 4125ae5..e4d3784 100644 --- a/src/smart-query.js +++ b/src/smart-query.js @@ -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 + } }