diff --git a/app/assets/javascripts/todos/components/todos_app.vue b/app/assets/javascripts/todos/components/todos_app.vue index 7d3ab94d4d9c6fd63f478c12f3dbea8feaa80e0e..1d5a911caedc84280f96b880dde8d0eaf6d7f91b 100644 --- a/app/assets/javascripts/todos/components/todos_app.vue +++ b/app/assets/javascripts/todos/components/todos_app.vue @@ -55,7 +55,7 @@ export default { }, data() { return { - updatePid: null, + updateTimeoutId: null, needsRefresh: false, cursor: { first: DEFAULT_PAGE_SIZE, @@ -228,18 +228,18 @@ export default { this.showSpinnerWhileLoading = true; }, startedInteracting() { - clearTimeout(this.updatePid); + clearTimeout(this.updateTimeoutId); }, stoppedInteracting() { if (!this.needsRefresh) { return; } - if (this.updatePid) { - clearTimeout(this.updatePid); + if (this.updateTimeoutId) { + clearTimeout(this.updateTimeoutId); } - this.updatePid = setTimeout(() => { + this.updateTimeoutId = setTimeout(() => { /* We double-check needsRefresh or whether a query is already running @@ -247,7 +247,7 @@ export default { if (this.needsRefresh && !this.$apollo.queries.todos.loading) { this.updateAllQueries(false); } - this.updatePid = null; + this.updateTimeoutId = null; }, TODO_WAIT_BEFORE_RELOAD); }, },