Skip to content

Commit 9d7cc94

Browse files
committed
fix solid-router e2e scroll restoration test
1 parent 45c31fb commit 9d7cc94

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • e2e/solid-router/basic-scroll-restoration/src

‎e2e/solid-router/basic-scroll-restoration/src/main.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ function ByElementComponent() {
114114
})
115115

116116
// Let's use TanStack Virtual to virtualize some content!
117-
const virtualizerParentRef: any = null
117+
let virtualizerParentRef: HTMLDivElement | undefined
118118
const virtualizer = createVirtualizer({
119119
count: 10000,
120-
getScrollElement: () => virtualizerParentRef?.current,
120+
getScrollElement: () => virtualizerParentRef ?? null,
121121
estimateSize: () => 100,
122122
// We pass the scrollY from the scroll restoration entry to the virtualizer
123123
// as the initial offset

0 commit comments

Comments
 (0)