Fix poll leak

This commit is contained in:
ekzyis 2023-11-26 23:28:58 +01:00
parent 73162155d5
commit 001ac39328
1 changed files with 4 additions and 1 deletions

View File

@ -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>