From aab2b9d59faca43ad9c40aad97924e3666492299 Mon Sep 17 00:00:00 2001 From: Igor Danchenko <64441155+igordanchenko@users.noreply.github.com> Date: Thu, 31 Mar 2022 19:24:40 -0400 Subject: [PATCH] fix: reset didUnmount flag when re-mounted --- src/react-image-lightbox.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/react-image-lightbox.js b/src/react-image-lightbox.js index ff8b2d7f..87d80442 100644 --- a/src/react-image-lightbox.js +++ b/src/react-image-lightbox.js @@ -191,6 +191,8 @@ class ReactImageLightbox extends Component { } componentDidMount() { + this.didUnmount = false; + if (!this.props.animationDisabled) { // Make opening animation play this.setState({ isClosing: false });