diff --git a/ui/src/copyable_text.tsx b/ui/src/copyable_text.tsx index ec45b189cb..1cf5058202 100644 --- a/ui/src/copyable_text.tsx +++ b/ui/src/copyable_text.tsx @@ -105,12 +105,7 @@ export const ClipboardCopyButton = ({ value, anchorElement, showOnHoverOnly = fa React.useEffect(() => { if (!anchorElement) return - if (portal) { - ReactDOM.render( - ReactDOM.createPortal(CopyButton, anchorElement), - btnContainerRef.current - ) - } + if (portal) ReactDOM.render(ReactDOM.createPortal(CopyButton, anchorElement), btnContainerRef.current) if (showOnHoverOnly) anchorElement.classList.add(css.hover) }, [CopyButton, anchorElement, portal, showOnHoverOnly])