We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b559e8c commit b772acdCopy full SHA for b772acd
resources/js/screens/jobs/item.vue
@@ -41,6 +41,7 @@
41
data() {
42
return {
43
job: {},
44
+ isMounted: true,
45
};
46
},
47
@@ -49,6 +50,10 @@
49
50
this.autoRefreshData();
51
52
53
+ beforeDestroy() {
54
+ this.isMounted = false;
55
+ },
56
+
57
computed: {
58
processOutput() {
59
if (!this.job.process) {
@@ -62,6 +67,10 @@
62
67
methods: {
63
68
async autoRefreshData() {
64
69
setTimeout(async () => {
70
+ if (this.isMounted === false) {
71
+ return;
72
+ }
73
65
74
if (this.job.status === 'Pending' || this.job.status === 'Running') {
66
75
await this.fetchData();
76
await this.autoRefreshData();
0 commit comments