mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-28 09:43:13 +00:00
clear interval on unmount
This commit is contained in:
parent
f2876e4e52
commit
9e4380bcd4
1 changed files with 5 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ export default {
|
|||
config: null,
|
||||
isLoading: false,
|
||||
loadingProgress: 0,
|
||||
reloadInterval: null,
|
||||
interfaces: [],
|
||||
pathTable: [],
|
||||
announces: {},
|
||||
|
|
@ -47,6 +48,9 @@ export default {
|
|||
edges: new DataSet(),
|
||||
};
|
||||
},
|
||||
beforeUnmount() {
|
||||
clearInterval(this.reloadInterval);
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
|
|
@ -157,7 +161,7 @@ export default {
|
|||
this.isLoading = false;
|
||||
|
||||
// auto update network
|
||||
setInterval(() => {
|
||||
this.reloadInterval = setInterval(() => {
|
||||
this.update();
|
||||
}, 10000);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue