-
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(remote-config): error calling getValue() before fetch #4068
Conversation
… before fetch success.
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.
Interesting - this looks good to me but since this is a common function I'd like a second pair of 👀
As an option, we can check is |
I'd prefer we did this rather than change a function in core 😅 would you mind making this change instead? |
Not a problem! |
Thank you :) LGTM, waiting for CI then I'll merge. |
Description
remoteConfig().getValue() errored when it invokes before fetch values success/failed, because this._values is undefined.
Added check for the correct type of "target" to hasOwnProperty method to prevent this issue.
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__