undefined typeof

This commit is contained in:
Henry Jameson 2026-08-04 00:31:24 +03:00
commit 0eb63de209
13 changed files with 25 additions and 25 deletions

View file

@ -154,7 +154,7 @@ const Timeline = {
})
},
mounted() {
if (typeof document.hidden !== 'undefined') {
if (document.hidden !== undefined) {
document.addEventListener(
'visibilitychange',
this.handleVisibilityChange,
@ -168,7 +168,7 @@ const Timeline = {
unmounted() {
window.removeEventListener('scroll', this.handleScroll)
window.removeEventListener('keydown', this.handleShortKey)
if (typeof document.hidden !== 'undefined')
if (document.hidden !== undefined)
document.removeEventListener(
'visibilitychange',
this.handleVisibilityChange,