Skip to content

Unhandled Runtime Error TypeError: Cannot read properties of null (reading 'clientHeight') #86

@firstpersoncode

Description

@firstpersoncode

I'm using this library in my NextJS project, and all the animated elements inside a scrolled div.
So I set scrollableParentSelector to the respective scrolled div.

Then I got this error:

Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'clientHeight')

Call Stack
ScrollAnimation.getVisibility
node_modules/react-animate-on-scroll/dist/scrollAnimation.min.js (127:0)
ScrollAnimation.handleScroll
node_modules/react-animate-on-scroll/dist/scrollAnimation.min.js (230:0)
invokeFunc
node_modules/lodash.throttle/index.js (160:0)
leadingEdge
node_modules/lodash.throttle/index.js (170:0)
HTMLDivElement.debounced
node_modules/lodash.throttle/index.js (235:0)

Any idea what's going on exactly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions