react-image-gallery: Uncaught TypeError on unmounting
Since v0.8.8, when an image gallery is unmounted, an Uncaught TypeError occurs:
Uncaught TypeError: Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.
at image-gallery.js:137
at invokeFunc (index.js:160)
at trailingEdge (index.js:207)
at timerExpired (index.js:195)
I believe it is introduced by adding the debounce in b273f9d0da94.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 12
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Fix observe call when element is not passed in #288 — committed to xiaolin/react-image-gallery by xiaolin 6 years ago
- fix issue #288 - add private property _isMounted to avoid calling setState() after component unmounted — committed to frayeralex/react-image-gallery by deleted user 6 years ago
- Fix observe call when element is not passed in #288 — committed to xiaolin/react-image-gallery by xiaolin 6 years ago
This is actually is reproducing on 0.8.7 as well
This is fixed in v0.8.9 that was just released.