0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2024-12-22 05:12:57 -05:00

Fix memory leak

This commit is contained in:
dragongoose 2023-08-18 13:28:43 -04:00
parent fc498f078d
commit 0b49686eda
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5

View file

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