Consider using "forEach" instead of "map" as its return value is not being used here.
Replace this trivial promise with "Promise.resolve".
This commit is contained in:
SashaXser
2024-01-19 08:50:45 +04:00
committed by GitHub
parent 8e13ec60d6
commit 14b6f84f94
3 changed files with 16 additions and 17 deletions

View File

@@ -131,21 +131,21 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi
};
};
(await branding.titles).map((title) => {
(await branding.titles).forEach((title) => {
title.title = title.title.replace("<", "");
initResult(title);
dbResult[title.videoID].titles.push(title);
});
(await branding.thumbnails).map((thumbnail) => {
(await branding.thumbnails).forEach((thumbnail) => {
initResult(thumbnail);
dbResult[thumbnail.videoID].thumbnails.push(thumbnail);
});
(await branding.segments).map((segment) => {
(await branding.segments).forEach((segment) => {
initResult(segment);
dbResult[segment.videoID].segments.push(segment);
});
});
return dbResult;
}, brandingHashKey(videoHashPrefix, service));