From f07d17324f4e4be813801d52a6c82e558c226f9b Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 30 May 2024 14:25:49 +0300 Subject: [PATCH] add comment --- .../src/ExpoBlueskyTranslateView.ios.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx b/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx index cd77b26bdf..290fabd30d 100644 --- a/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx +++ b/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx @@ -15,12 +15,10 @@ export function NativeTranslationView() { return } -const twoDigitVersion = String(Platform.Version) - .split('.') - .slice(0, 2) - .join('.') +// can be something like "17.5.1", so just take the first two parts +const version = String(Platform.Version).split('.').slice(0, 2).join('.') -export const isAvailable = Number(twoDigitVersion) >= 17.4 +export const isAvailable = Number(version) >= 17.4 // https://en.wikipedia.org/wiki/Translate_(Apple)#Languages const SUPPORTED_LANGUAGES = [