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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user