From f8f66c8190071ba1d13ac2cb4b6615d1a04f7f96 Mon Sep 17 00:00:00 2001 From: Vadym Shymko Date: Sat, 24 Dec 2022 22:43:30 +0200 Subject: [PATCH] Fix detect is ready for render --- package.json | 2 +- src/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c4dd657..5589bb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-clear-modal", - "version": "1.0.0", + "version": "1.0.1", "description": "Simple and lightweight, fully controlled isomorphic (with SSR support) modal component for React.js", "files": [ "dist/" diff --git a/src/index.tsx b/src/index.tsx index f4d6ddc..6ea0c26 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -45,7 +45,7 @@ function ReactClearModal({ ...wrapperProps }: ReactClearModalProps) { const [isReadyForRender, setIsReadyForRender] = useState( - !disableRenderInPortal || typeof window !== 'undefined' + disableRenderInPortal ); const closeTimeoutRef = useRef(null); const contentRef = useRef(null);