mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-05 21:37:58 +01:00
refs #174 Skip removeEvents when dom does not have a target element
This commit is contained in:
parent
e77e05c556
commit
ec126ef4f0
@ -45,7 +45,9 @@ export default {
|
||||
document.getElementById('scrollable').addEventListener('scroll', this.onScroll)
|
||||
},
|
||||
destroyed () {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
if (document.getElementById('scrollable') !== undefined && document.getElementById('scrollable') !== null) {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateToot (message) {
|
||||
|
@ -32,7 +32,9 @@ export default {
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.commit('TimelineSpace/archiveHomeTimeline')
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
if (document.getElementById('scrollable') !== undefined && document.getElementById('scrollable') !== null) {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onScroll (event) {
|
||||
|
@ -41,7 +41,9 @@ export default {
|
||||
this.$store.dispatch('TimelineSpace/Contents/Local/stopLocalStreaming')
|
||||
},
|
||||
destroyed () {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
if (document.getElementById('scrollable') !== undefined && document.getElementById('scrollable') !== null) {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initialize () {
|
||||
|
@ -32,7 +32,9 @@ export default {
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.commit('TimelineSpace/archiveNotifications')
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
if (document.getElementById('scrollable') !== undefined && document.getElementById('scrollable') !== null) {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onScroll (event) {
|
||||
|
@ -41,7 +41,9 @@ export default {
|
||||
this.$store.dispatch('TimelineSpace/Contents/Public/stopPublicStreaming')
|
||||
},
|
||||
destroyed () {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
if (document.getElementById('scrollable') !== undefined && document.getElementById('scrollable') !== null) {
|
||||
document.getElementById('scrollable').removeEventListener('scroll', this.onScroll)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initialize () {
|
||||
|
Loading…
Reference in New Issue
Block a user