-
Notifications
You must be signed in to change notification settings - Fork 21
Description
🐞 Describe the bug
There is a new fatal error on the server in the NextJS environment of the POW team.
They traced it back the rabbit hole and sent us the following information:
"It is due to the fact, that the post-main-navigation component assumes that an animation object is always present when closing the mobile menu.
When the menu is closed before any animation is created (e.g. during SSR hydration), calling closeMobileMenu throws because it tries to access .finish() on undefined."
As far as I could see, this is not exclusively coming from post-main-navigation, but also is an issue in the post-collapsible component (see error message below).
🛠️ To Reproduce
See the logs for the swisspost/pow-cargo project.
✨ Expected behavior
post-main-navigation does not throw if closeMobileMenu is undefined because its existance/definition is checked, before the execution of any animation related function is performed.
📷 Screenshots
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
