undefined typeof
This commit is contained in:
parent
d62716e301
commit
0eb63de209
13 changed files with 25 additions and 25 deletions
|
|
@ -59,7 +59,7 @@ const Chat = {
|
|||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
if (typeof document.hidden !== 'undefined') {
|
||||
if (document.hidden !== undefined) {
|
||||
document.addEventListener(
|
||||
'visibilitychange',
|
||||
this.handleVisibilityChange,
|
||||
|
|
@ -74,7 +74,7 @@ const Chat = {
|
|||
unmounted() {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
window.removeEventListener('resize', this.handleResize)
|
||||
if (typeof document.hidden !== 'undefined')
|
||||
if (document.hidden !== undefined)
|
||||
document.removeEventListener(
|
||||
'visibilitychange',
|
||||
this.handleVisibilityChange,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue