Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rare-crabs-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/virtual-core': patch
---

fix(virtual-core): prevent scrollToIndex crash on unmount
2 changes: 1 addition & 1 deletion packages/virtual-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ export class Virtualizer<

// In dynamic mode, wait an extra frame for ResizeObserver to measure newly visible elements
if (this.isDynamicMode()) {
this.targetWindow!.requestAnimationFrame(verify)
this.targetWindow?.requestAnimationFrame(verify)
} else {
verify()
}
Expand Down
Loading