-
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
fix: Add missing null to profile update #4179
Conversation
You need to specify null when you want to remove the current user's photo
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/invertase/react-native-firebase/izmg0z08l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there! Thanks for proposing this
It was very hard to find documentation related to it, the Java + Objective-C documents did not mention it but I found it in the Javascript SDK docs: https://firebase.google.com/docs/reference/js/firebase.User#updateprofile
So I see two issues:
- could you also update the type for the user name? It shares this clearing style
- could you update the documentation for the parameters? e.g. from "An optional photo URL for the user. Not passing it leaves it unchanged. Passing null clears the value"
@andreibarabas - a quick tweak of the PR in response to the feedback and we can merge this I think! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I patched it up for you
Good to go pending CI queue clearing after #4209 is resolved |
…vertase#4179) * fix: Add missing null to profile update You need to specify null when you want to remove the current user's photo * Update displayName to use same style, and docs to match Co-authored-by: Mike Hardy <[email protected]>
You need to specify null when you want to remove the current user's photo
Description
Currently, if you want to remove a profile photoURL, you need to specify NULL, but typescript will complain about it.
Related issues
N/A
Release Summary
Fix: add missing type when removing profile photo
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
N/A
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter