Simple patch to handling AsyncStorage when values come back as falsy from either Firestore or AsyncStorage. Also added more succinct messages to inform a developer what is happening.
Changes
For signOutUser(), the argument hasExpoPushToken has been renamed to deleteExpoPushToken to more closely reflect what the argument actually does
Anytime a user is fetched, the user data is checked whether it is undefined. If it is, log a warning and set info as undefined
This also means the user will return to the login screen now when their data does not exist in Firestore.
Error handling for removing an expo push token that doesn't exist (Though, I don't believe this was actually an issue. The app works as intended when I added it though, so it stays :P)
Simple patch to handling
AsyncStorage
when values come back as falsy from eitherFirestore
orAsyncStorage
. Also added more succinct messages to inform a developer what is happening.Changes
signOutUser()
, the argumenthasExpoPushToken
has been renamed todeleteExpoPushToken
to more closely reflect what the argument actually does