diff --git a/packages/pl-fe/src/components/scrollable-list.tsx b/packages/pl-fe/src/components/scrollable-list.tsx index c368ad47d..1c7cf6d23 100644 --- a/packages/pl-fe/src/components/scrollable-list.tsx +++ b/packages/pl-fe/src/components/scrollable-list.tsx @@ -212,13 +212,16 @@ const ScrollableList = React.forwardRef(({ /** Figure out the initial index to scroll to. */ const initialIndex = useMemo(() => { if (showLoading) return 0; - if (typeof initialTopMostItemIndex === 'number') { - return { - align: 'center', - index: initialTopMostItemIndex, - }; + + if (initialTopMostItemIndex) { + if (typeof initialTopMostItemIndex === 'number') { + return { + align: 'center', + index: initialTopMostItemIndex, + }; + } + return initialTopMostItemIndex; } - if (initialTopMostItemIndex) return initialTopMostItemIndex; if (scrollData && history.action === 'POP') { return {