Fix memory leak
This commit is contained in:
parent
fc498f078d
commit
0b49686eda
@ -28,11 +28,13 @@ export default {
|
|||||||
this.data = data
|
this.data = data
|
||||||
})
|
})
|
||||||
|
|
||||||
this.getMoreStreams()
|
window.onscroll = this.getMoreStreams
|
||||||
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
window.onscroll = null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMoreStreams() {
|
async getMoreStreams() {
|
||||||
window.onscroll = async () => {
|
|
||||||
let bottomOfWindow =
|
let bottomOfWindow =
|
||||||
document.documentElement.scrollTop + window.innerHeight ===
|
document.documentElement.scrollTop + window.innerHeight ===
|
||||||
document.documentElement.offsetHeight
|
document.documentElement.offsetHeight
|
||||||
@ -61,7 +63,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
abbreviate
|
abbreviate
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user