-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Connection State return number value, not boolean #55
Comments
Seems like incorrect behaviour, can you tell me which platform this issue is on, android or ios? |
@Salakar |
Thanks for investigating this issue. I'm porting my app to Android as well, so I'll check and inform if there is anything should be changed. |
Might also be an issue with the type conversion in RNFirebase also, @dzuncoi could you try see what setting/reading a boolean value on any ref returns? We have tests for this that check all types including Booleans and it's passing, may be some weird edge case in your instance where it isn't. |
I've tested on Android with the same codes and it return boolean values. And on Android,
this behavior does not happen as iOS. |
This has been the case for a while but I just deal with it by testing for either 1 or true. |
Use == instead of === |
Closing this as there's not much I can do about it, native SDK's return the value like this, but android returns an actual boolean value. |
Hi,
Currently, I'm using
.info/connected
to detect app connection state, asAnd I expect
connectionState
should return boolean value (true
offalse
), as this Firebase doc.But it doesn't, my
connectionState
value always returnfalse
at the first time, then return1
if app has connection and0
if not. Is it a correct behavior?Ps: I'm still fine with those value, just want to confirm this behavior.
The text was updated successfully, but these errors were encountered: