Fix poll leak
This commit is contained in:
parent
73162155d5
commit
001ac39328
|
@ -54,7 +54,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { onUnmounted, ref } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
@ -120,6 +120,9 @@ await (async () => {
|
||||||
invoice.value = body
|
invoice.value = body
|
||||||
interval = setInterval(poll, INVOICE_POLL)
|
interval = setInterval(poll, INVOICE_POLL)
|
||||||
})()
|
})()
|
||||||
|
|
||||||
|
onUnmounted(() => { clearInterval(interval) })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
Loading…
Reference in New Issue