From 94dad99029730a957cc33dcfe1642a90466f69da Mon Sep 17 00:00:00 2001 From: Prageeth Silva Date: Sun, 24 Jan 2021 01:37:55 +0100 Subject: [PATCH 1/2] Update Link.js (cherry picked from commit 6c2a68ce2136254a531875eb26a68c919cd2d54d) --- src/Link.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Link.js b/src/Link.js index 643815c..6661cb2 100644 --- a/src/Link.js +++ b/src/Link.js @@ -48,4 +48,6 @@ export const setLinkProps = (props) => { * * @param {Object} props Requires `href`. `onClick` is optional */ -export const A = (props) => ; +export const A = React.forwardRef( + (props, ref) => +); From feb9e3793357b7fc8556528023bc11bdd6764ff8 Mon Sep 17 00:00:00 2001 From: Prageeth Silva Date: Sun, 24 Jan 2021 02:01:42 +0100 Subject: [PATCH 2/2] Remove extra closing parentheses --- src/Link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Link.js b/src/Link.js index 6661cb2..282f2ea 100644 --- a/src/Link.js +++ b/src/Link.js @@ -19,7 +19,7 @@ import {navigate, getBasepath} from "./router"; */ export const setLinkProps = (props) => { const onClick = (e) => { - if (!e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey && props.target !== "_blank")) { + if (!e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey && props.target !== "_blank") { e.preventDefault(); // prevent the link from actually navigating navigate(e.currentTarget.href); }