From f24bcdf65f5d038e7089c014e7c401ea3c16baf9 Mon Sep 17 00:00:00 2001 From: Andreas Tzionis Date: Wed, 27 Mar 2024 19:22:00 +0200 Subject: [PATCH] fixed e2e test --- lib/client/vanilla/link.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/client/vanilla/link.tsx b/lib/client/vanilla/link.tsx index f93ca59a..0801904f 100644 --- a/lib/client/vanilla/link.tsx +++ b/lib/client/vanilla/link.tsx @@ -17,7 +17,8 @@ const Dialog: React.FC = ({ open, setOpen, selectedElement }) => { const [newTab, setNewTab] = useState(true) useEffect(() => { - if (selectedElement) { + if (selectedElement && selectedElement.href) { + // console.log(selectedElement.href) const url = new URL(selectedElement.href) const linkNew = url.hostname === 'localhost' ? url.pathname.replace('/', '') + url.hash : selectedElement.href setLink(linkNew)