diff --git a/src/status.ts b/src/status.ts index b60cf32..efde165 100644 --- a/src/status.ts +++ b/src/status.ts @@ -101,7 +101,7 @@ export const handleStatus = async ( /* Photo renderer */ if (tweet.media?.photos) { const { photos } = tweet.media; - let photo = photos[mediaNumber || 0]; + let photo = photos[(mediaNumber || 1) - 1]; if ( typeof mediaNumber !== 'number' && diff --git a/src/translate.ts b/src/translate.ts index b1162a7..dd8d9b0 100644 --- a/src/translate.ts +++ b/src/translate.ts @@ -43,7 +43,7 @@ export const translateTweet = async ( console.log(translationResults); return translationResults; } catch (e: any) { - console.error('Unknown error while fetching from Translation API'); + console.error('Unknown error while fetching from Translation API', e); return {} as TranslationPartial; // No work to do } };