diff --git a/front/src/components/library/import/BatchDetail.vue b/front/src/components/library/import/BatchDetail.vue index 417fd55c2..0864d2464 100644 --- a/front/src/components/library/import/BatchDetail.vue +++ b/front/src/components/library/import/BatchDetail.vue @@ -62,12 +62,18 @@ export default { data () { return { isLoading: true, - batch: null + batch: null, + timeout: null } }, created () { this.fetchData() }, + destroyed () { + if (this.timeout) { + clearTimeout(this.timeout) + } + }, methods: { fetchData () { var self = this @@ -78,7 +84,7 @@ export default { self.batch = response.data self.isLoading = false if (self.batch.status === 'pending') { - setTimeout( + self.timeout = setTimeout( self.fetchData, 5000 )