From f7840291589b74e425e69860610d648f49d1d63b Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 27 Mar 2024 07:17:44 -0600 Subject: [PATCH] Fix wrong camera bug --- web/src/components/player/PreviewThumbnailPlayer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/components/player/PreviewThumbnailPlayer.tsx b/web/src/components/player/PreviewThumbnailPlayer.tsx index 95b6bd6b24..3f2ed212ab 100644 --- a/web/src/components/player/PreviewThumbnailPlayer.tsx +++ b/web/src/components/player/PreviewThumbnailPlayer.tsx @@ -111,7 +111,9 @@ export default function PreviewThumbnailPlayer({ } else { // the second preview is longer, return the second if it exists if (firstIndex < allPreviews.length - 1) { - return allPreviews[firstIndex + 1]; + return allPreviews.find( + (preview, idx) => idx > firstIndex && preview.camera == review.camera, + ); } return undefined;