Skip to content

getScrollParents util can push "null" as sole scroll parent when body has not been rendered, causing fatal error #285

Open
@circAssimilate

Description

getScrollParents util can push null as sole scroll parent, causing a fatal error, when the body has not been rendered. This is the line that is leading to the below error:

https://github.com/HubSpot/tether/blob/1fea67260ebdd6bc3d42ebe7f91b367174178d97/src/js/utils.js#L65

Getting Uncaught TypeError: Cannot read property 'addEventListener' of null

In our application, we load our main bundle before the body for performance reasons. Is there a possibility for an option that can delay tethering until the body is ready? Open to any other approaches too.

Metadata

Assignees

No one assigned

    Labels

    bughacktoberfesthacktoberfest issues for newer contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions