Fix array out of range error in reviews (#11059)

This commit is contained in:
Josh Hawkins
2024-04-21 20:03:43 -05:00
committed by GitHub
parent baf363fcb0
commit acadfb6959

View File

@@ -589,7 +589,8 @@ function DetectionReview({
</div> </div>
); );
}) })
: Array(itemsToReview) : (itemsToReview ?? 0) > 0 &&
Array(itemsToReview)
.fill(0) .fill(0)
.map((_, idx) => ( .map((_, idx) => (
<Skeleton key={idx} className="size-full aspect-video" /> <Skeleton key={idx} className="size-full aspect-video" />