From 43fe3bae37926ee42d8d399d0538390d9228b8fa Mon Sep 17 00:00:00 2001 From: prince-deriv Date: Fri, 2 Aug 2024 12:23:49 +0400 Subject: [PATCH] fix: code suggestions --- src/javascript/app/pages/portal.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/javascript/app/pages/portal.jsx b/src/javascript/app/pages/portal.jsx index a7226882f30..f499b93ac7a 100644 --- a/src/javascript/app/pages/portal.jsx +++ b/src/javascript/app/pages/portal.jsx @@ -2,11 +2,7 @@ import { useEffect, useRef } from 'react'; import ReactDOM from 'react-dom'; const Portal = ({ children }) => { - const elRef = useRef(null); - - if (!elRef.current) { - elRef.current = document.createElement('div'); - } + const elRef = useRef(document.createElement('div')); useEffect(() => { const el = elRef.current;