Skip to content

Commit

Permalink
Coerce AppState.isAvailable to a boolean
Browse files Browse the repository at this point in the history
Close #2674
  • Loading branch information
mozzius authored and necolas committed Oct 15, 2024
1 parent 7401d69 commit ce28ea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native-web/src/exports/AppState/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const AppStates = {
let changeEmitter = null;

export default class AppState {
static isAvailable = canUseDOM && document[VISIBILITY_STATE_PROPERTY];
static isAvailable = canUseDOM && !!document[VISIBILITY_STATE_PROPERTY];

static get currentState() {
if (!AppState.isAvailable) {
Expand Down

0 comments on commit ce28ea8

Please sign in to comment.