From d0a2749f921300b777a67e1f9b780a62081ab5e9 Mon Sep 17 00:00:00 2001 From: Feng Zhou Date: Thu, 21 Nov 2019 18:56:04 +1100 Subject: [PATCH] In AUlinkList, pass link via the "to" prop when linkComponent is not "a". --- packages/link-list/src/js/react.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/link-list/src/js/react.js b/packages/link-list/src/js/react.js index e12d2cd86..83895d0a8 100644 --- a/packages/link-list/src/js/react.js +++ b/packages/link-list/src/js/react.js @@ -42,9 +42,8 @@ export const AUlinkListItem = ({ text, link, linkComponent, li = {}, children, o // If we are using a normal link if( LinkComponent === 'a' ) { attributeOptions.href = link; - } - // If we are using a link component - else if( typeof LinkComponent === 'function' ) { + } else { + // If we are using a link component attributeOptions.to = link; }