Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppState.isAvailable is a string instead of a boolean #2673

Closed
1 task done
mozzius opened this issue May 24, 2024 · 1 comment
Closed
1 task done

AppState.isAvailable is a string instead of a boolean #2673

mozzius opened this issue May 24, 2024 · 1 comment
Labels

Comments

@mozzius
Copy link
Contributor

mozzius commented May 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

AppState.isAvailable should just be a boolean, as documented here:

https://necolas.github.io/react-native-web/docs/app-state/#static-properties

However, since the check does not coerce document[VISIBILITY_STATE_PROPERTY] to a boolean, it ends up being a string such as "visible"

Expected behavior

AppState.isAvailable should be a bool

Steps to reproduce

  1. Log AppState.isAvailable to console
  2. It should be a string instead of a bool

Test case

https://codesandbox.io/p/sandbox/interesting-dream-fq6q93

Additional comments

No response

@necolas
Copy link
Owner

necolas commented Oct 16, 2024

Fixed by #2674

@necolas necolas closed this as completed Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants