From c680a9fe70031ee879e0f75f29de3392d8732cfa Mon Sep 17 00:00:00 2001 From: Avery Lee Date: Wed, 18 Dec 2024 14:50:16 -0800 Subject: [PATCH] End polling for case details after conversation has been created. --- src/dispatch/static/dispatch/src/case/store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dispatch/static/dispatch/src/case/store.js b/src/dispatch/static/dispatch/src/case/store.js index 2da9c36e84a5..daa9ecbb87b1 100644 --- a/src/dispatch/static/dispatch/src/case/store.js +++ b/src/dispatch/static/dispatch/src/case/store.js @@ -263,14 +263,14 @@ const actions = { .then((response) => { commit("SET_SELECTED", response.data) commit("SET_SELECTED_LOADING", false) - this.interval = setInterval(function () { + var interval = setInterval(function () { if (state.selected.id) { dispatch("get") } // TODO this is fragile but we don't set anything as "created" if (state.selected.conversation) { - clearInterval(this.interval) + clearInterval(interval) } }, 5000) })