Skip to content

Commit a07caac

Browse files
committed
Change to map (also fixes initial indicator)
1 parent 167c3b6 commit a07caac

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/components/tabController/useScrollToItem.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,7 @@ const useScrollToItem = <T extends ScrollToSupportedViews>(props: ScrollToItemPr
150150
// Update shared values
151151
itemsWidthsAnimated.modify((value) => {
152152
'worklet';
153-
value.forEach((_, index) => {
154-
value[index] = widths[index];
155-
});
156-
return value;
153+
return value.map((_, index) => widths[index]);
157154
});
158155

159156
itemsOffsetsAnimated.modify((value) => {

0 commit comments

Comments
 (0)