mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-15 09:24:01 +01:00
Fixed photo selection bug
This commit is contained in:
parent
5afb9ffe37
commit
d1cdd2caf0
2 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ export const handleStatus = async (
|
||||||
/* Photo renderer */
|
/* Photo renderer */
|
||||||
if (tweet.media?.photos) {
|
if (tweet.media?.photos) {
|
||||||
const { photos } = tweet.media;
|
const { photos } = tweet.media;
|
||||||
let photo = photos[mediaNumber || 0];
|
let photo = photos[(mediaNumber || 1) - 1];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof mediaNumber !== 'number' &&
|
typeof mediaNumber !== 'number' &&
|
||||||
|
|
|
@ -43,7 +43,7 @@ export const translateTweet = async (
|
||||||
console.log(translationResults);
|
console.log(translationResults);
|
||||||
return translationResults;
|
return translationResults;
|
||||||
} catch (e: any) {
|
} 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
|
return {} as TranslationPartial; // No work to do
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue