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