Skip to content

Commit ce28ea8

Browse files
mozziusnecolas
authored andcommitted
Coerce AppState.isAvailable to a boolean
Close #2674
1 parent 7401d69 commit ce28ea8

File tree

1 file changed

+1
-1
lines changed
  • packages/react-native-web/src/exports/AppState

1 file changed

+1
-1
lines changed

packages/react-native-web/src/exports/AppState/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const AppStates = {
3434
let changeEmitter = null;
3535

3636
export default class AppState {
37-
static isAvailable = canUseDOM && document[VISIBILITY_STATE_PROPERTY];
37+
static isAvailable = canUseDOM && !!document[VISIBILITY_STATE_PROPERTY];
3838

3939
static get currentState() {
4040
if (!AppState.isAvailable) {

0 commit comments

Comments
 (0)