Lattice-Automation / seqviz

a JavaScript DNA, RNA, and protein sequence viewer
https://tools.latticeautomation.com/seqviz
MIT License
247 stars 53 forks source link

TypeError: Cannot read properties of null (reading 'scrollTop') #197

Closed mattwongasimov closed 1 year ago

mattwongasimov commented 1 year ago

Describe the bug

We didn't experience a bug, rather a console.error related to seqviz. When navigating to a page with a seqviz component (React), and then quickly navigating away, the following error appears.

TypeError: Cannot read properties of null (reading 'scrollTop')

seqviz/src/Linear/InfiniteScroll.tsx at line 207:21

Expected behavior Error was no-reproducible.

Your environment:

jjti commented 1 year ago

@mattwongasimov I added some more null checks here: https://github.com/Lattice-Automation/seqviz/releases/tag/3.7.10

I think I understand the cause, so will mark this as resolve, but please let me know if you continue to run into this

jjti commented 1 year ago

ref to fix: https://github.com/Lattice-Automation/seqviz/commit/01baf956238394de8c71d37ae1e5562dcf4ac524