Skip to content

Conversation

@johnsonsu
Copy link

Fix #81

Due to events like onScroll that this library listens to are not synchronous, they can be fired right after the component is already unmounted, causing ref.current to be null. This PR fixes the issue by using optional chaining instead of non-null assertion on ref.current usages.

@MaksimLavrenyuk
Copy link

@thmsgbrt Can you appreciate this branch? It's an important fix.

@reinos
Copy link

reinos commented Apr 28, 2025

When will this be merged? It's indeed an important fix as we get a lot of such errors in our application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onSrolll: null is not an object (evaluating 'P.current.classList')

3 participants