Skip to content

Commit 3d07472

Browse files
Stop polling report info when navigating away (#531)
1 parent 5493779 commit 3d07472

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

resources/js/pages/reports/Show.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Head, usePoll } from '@statamic/cms/inertia';
33
import { DateFormatter } from '@statamic/cms';
44
import { Header, Button, DocsCallout, Icon, Panel, Card, Description, Listing, Badge, DropdownItem, Heading } from '@statamic/cms/ui';
55
import StatusIcon from "../../components/reporting/StatusIcon.vue";
6-
import { computed, ref, watch } from 'vue';
6+
import { computed, ref, watch, onBeforeUnmount } from 'vue';
77
import PageDetailsModal from "../../components/reporting/PageDetailsModal.vue";
88
99
const props = defineProps({
@@ -48,6 +48,8 @@ if (isGenerating.value) {
4848
() => isGenerating.value,
4949
() => (isGenerating.value ? start() : stop())
5050
);
51+
52+
onBeforeUnmount(stop);
5153
}
5254
</script>
5355

0 commit comments

Comments
 (0)