Skip to content

Commit 71f412c

Browse files
Updated the fix.
1 parent b0eaa10 commit 71f412c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Controls/src/Core/Handlers/Items/CarouselViewHandler.Windows.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ void UpdateCurrentItem()
384384

385385
var currentItemPosition = GetItemPositionInCarousel(ItemsView.CurrentItem);
386386

387-
if (currentItemPosition < 0 || currentItemPosition >= ItemCount || ItemsView.Position == currentItemPosition)
387+
bool isOutOfBounds = currentItemPosition < 0 || currentItemPosition >= ItemCount;
388+
bool isSamePosition = ItemsView.Position == currentItemPosition;
389+
390+
if (isOutOfBounds || isSamePosition)
388391
{
389392
return;
390393
}

0 commit comments

Comments
 (0)