Unblock React Compiler for 5 components with early exits inside try (#11547)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tomasz Zawadzki
2026-08-31 15:52:17 +02:00
committed by GitHub
parent f9cf58ea44
commit a086a2ebe0
5 changed files with 45 additions and 18 deletions
+6 -6
View File
@@ -21,12 +21,12 @@ export function useGoogleTranslate() {
if (IS_ANDROID) {
try {
// use `getApplicationIconAsync` to determine if the translate app is installed
if (
!(await IntentLauncher.getApplicationIconAsync(
'com.google.android.apps.translate',
))
) {
throw new Error('Translate app not installed')
const installed = await IntentLauncher.getApplicationIconAsync(
'com.google.android.apps.translate',
)
if (!installed) {
openLink(translateUrl)
return
}
// TODO: this should only be called one at a time, use something like