-
Notifications
You must be signed in to change notification settings - Fork 926
firestore: verify DOMException exists before using it in when base64 decoding #7130
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
Conversation
🦋 Changeset detectedLatest commit: fa2146b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
In #7115 the customer shows that the "browser" logic for decoding a base64 string was being invoked from a react-native app. In react-native, the
DOMException
class does not exist, which results in the following error:This usage of
DOMException
was added by #7019.Although a react-native app should be using a different implementation of base64 decoding, we may as well be safe here so that the error message produced from a react-native app is more meaningful, something like
Uncaught ReferenceError: atob() is not defined
.