diff --git a/src/components/apphost.js b/src/components/apphost.js index 294ecb09f0..ff113b7a9f 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -454,7 +454,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper", "webSettings"], f if (doc) { doc.addEventListener(visibilityChange, function () { /* eslint-disable-next-line compat/compat */ - if (document[visibilityState]) { + if (document.visibilityState) { onAppHidden(); } else { onAppVisible();