mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-05 07:12:20 +02:00
Clean up global listener in Sidebar component. (#4331)
Every time the component was mounted it would add another listener. Since old listeners would often error this could cause a lot of log spam, particularly when using the hotloader on a mobile device.
This commit is contained in:
parent
2b634a6ba6
commit
5d76ed888c
|
@ -195,6 +195,9 @@ export default {
|
|||
|
||||
document.body.addEventListener("touchstart", this.onTouchStart, {passive: true});
|
||||
},
|
||||
destroyed() {
|
||||
document.body.removeEventListener("touchstart", this.onTouchStart, {passive: true});
|
||||
},
|
||||
methods: {
|
||||
isPublic: () => document.body.classList.contains("public"),
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue