mirror of
https://codeberg.org/SafeTwitch/safetwitch.git
synced 2024-12-22 13:22:58 -05:00
Fix memory leak
This commit is contained in:
parent
fc498f078d
commit
0b49686eda
1 changed files with 5 additions and 4 deletions
|
@ -28,11 +28,13 @@ export default {
|
|||
this.data = data
|
||||
})
|
||||
|
||||
this.getMoreStreams()
|
||||
window.onscroll = this.getMoreStreams
|
||||
},
|
||||
beforeUnmount() {
|
||||
window.onscroll = null
|
||||
},
|
||||
methods: {
|
||||
getMoreStreams() {
|
||||
window.onscroll = async () => {
|
||||
async getMoreStreams() {
|
||||
let bottomOfWindow =
|
||||
document.documentElement.scrollTop + window.innerHeight ===
|
||||
document.documentElement.offsetHeight
|
||||
|
@ -61,7 +63,6 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
abbreviate
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue