From 32e137ec1beb294a7b52f8c044334554aba2c121 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Wed, 7 Aug 2019 15:18:38 -0500 Subject: [PATCH] viewUrl is always required and should never be null/undefined --- .../src/shared/buttons/subscribe/SubscribeButton.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx b/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx index 879a30a66..fc7afd0ff 100644 --- a/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx +++ b/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx @@ -13,14 +13,12 @@ interface Props { viewUrlMirrors: string[]; }; -export const SubscribeButton = (props: Props): JSX.Element | null => +export const SubscribeButton = (props: Props): JSX.Element => (props.viewUrlMirrors && props.viewUrlMirrors.length > 0) ? - : props.viewUrl - ?
- -
- : null; + :
+ +
; const SubscribeButtonDropdown = (props: Props): JSX.Element => { var buttonProps = buildButtonProps(props.name, props.viewUrl);