From 657d0775f55dc2494a12cbb7702886f07327d729 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 25 Jun 2018 20:45:26 -0700 Subject: [PATCH] Closes #706 - internal links incorrectly redirecting --- app/scenes/Document/Document.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/scenes/Document/Document.js b/app/scenes/Document/Document.js index 97fe378cf..0cf0dc728 100644 --- a/app/scenes/Document/Document.js +++ b/app/scenes/Document/Document.js @@ -234,7 +234,8 @@ class DocumentScene extends React.Component { onClickLink = (href: string) => { if (isInternalUrl(href)) { - this.props.history.push(href); + const url = new URL(href); + this.props.history.push(url.pathname); } else { window.open(href, '_blank'); }