From a26d5978b623019ff87920aeaf82f5af9c0a59bf Mon Sep 17 00:00:00 2001 From: fritz-c Date: Sun, 17 Dec 2017 19:05:20 +0900 Subject: [PATCH] fix: silence react-modal warning by setting appElement --- src/react-image-lightbox.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/react-image-lightbox.js b/src/react-image-lightbox.js index 1fa40a3b..3d8796b6 100644 --- a/src/react-image-lightbox.js +++ b/src/react-image-lightbox.js @@ -1571,6 +1571,9 @@ class ReactImageLightbox extends Component { }} style={modalStyle} contentLabel={translate('Lightbox')} + appElement={ + typeof window !== 'undefined' ? window.document.body : undefined + } >