zeeguu / web

Frontend for the zeeguu web application.
https://www.zeeguu.org
3 stars 5 forks source link

Fix uncaught exception when back navigating to articles #397

Closed tfnribeiro closed 1 month ago

tfnribeiro commented 1 month ago

image

"articleListRef.current is not iterable" occurs when the user is at the bottom of a page and clicks on the "Go Back" browser navigation. This triggers the handleScroll which wouldn't have any reference to the current articles.

I added a safeguard that doesn't run the method if articleListRef.current is undefined, which fixed the issue.

netlify[bot] commented 1 month ago

Deploy Preview for voluble-nougat-015dd1 ready!

Name Link
Latest commit 428f50913944c102bc47c1bd2644005d215cd5f5
Latest deploy log https://app.netlify.com/sites/voluble-nougat-015dd1/deploys/66616f919733980008fd966c
Deploy Preview https://deploy-preview-397--voluble-nougat-015dd1.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

tfnribeiro commented 1 month ago

This is also fixed by PR: https://github.com/zeeguu/web/pull/395

tfnribeiro commented 1 month ago

Closing to avoid confusion with PR #395