Bug description
When the LazyLoadImage component is used in a component that is not visible in the window, the componentWillUnmount lifecycle method is called by React on it. If I do not scroll down to have it become visible and instead perform a navigation to a different page, the componentWillUnmount is called again, at which point this.placeholder is null (see screenshot, I added console.log at line 54 in resulting in src/components/PlaceholderWithoutTracking.jsx)
Uncaught TypeError: IntersectionObserver.unobserve: Argument 1 is not an object.
To Reproduce
Paste the code that is producing the issue
Bug description When the
LazyLoadImage
component is used in a component that is not visible in the window, thecomponentWillUnmount
lifecycle method is called by React on it. If I do not scroll down to have it become visible and instead perform a navigation to a different page, thecomponentWillUnmount
is called again, at which pointthis.placeholder
isnull
(see screenshot, I added console.log at line 54 in resulting insrc/components/PlaceholderWithoutTracking.jsx
)Uncaught TypeError: IntersectionObserver.unobserve: Argument 1 is not an object.
To Reproduce Paste the code that is producing the issue
Expected behavior Navigation to next page to happen without error.
Screenshots
Technical details: