From 11a4524c4cded63751bc158e28296ee7d38b7870 Mon Sep 17 00:00:00 2001 From: zeppi Date: Wed, 13 Oct 2021 13:34:23 -0400 Subject: [PATCH] lint --- ui/component/userChannelFollowIntro/view.jsx | 19 +++++++++++++------ ui/component/userFirstChannel/view.jsx | 2 +- ui/page/show/view.jsx | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ui/component/userChannelFollowIntro/view.jsx b/ui/component/userChannelFollowIntro/view.jsx index 559bc93b5..ebf27c32e 100644 --- a/ui/component/userChannelFollowIntro/view.jsx +++ b/ui/component/userChannelFollowIntro/view.jsx @@ -40,12 +40,19 @@ function UserChannelFollowIntro(props: Props) { useEffect(() => { if (channelsToSubscribe && channelsToSubscribe.length && prefsReady) { const delayedChannelSubscribe = () => { - channelsToSubscribe.forEach((c) => - channelSubscribe({ - channelName: parseURI(c).claimName, - uri: c, - }) - ); + channelsToSubscribe.forEach((c) => { + let claimName; + try { + const { claimName: name } = parseURI(c); + claimName = name; + } catch (e) {} + if (claimName) { + channelSubscribe({ + channelName: claimName, + uri: c, + }); + } + }); }; setTimeout(delayedChannelSubscribe, 1000); } diff --git a/ui/component/userFirstChannel/view.jsx b/ui/component/userFirstChannel/view.jsx index 4b8201a51..74fe874dd 100644 --- a/ui/component/userFirstChannel/view.jsx +++ b/ui/component/userFirstChannel/view.jsx @@ -44,7 +44,7 @@ function UserFirstChannel(props: Props) { function handleChannelChange(e) { const { value } = e.target; setChannel(value); - if (!isNameValid(value, false)) { + if (!isNameValid(value)) { setNameError(INVALID_NAME_ERROR); } else { setNameError(); diff --git a/ui/page/show/view.jsx b/ui/page/show/view.jsx index 5f1318c5c..0f0697f6b 100644 --- a/ui/page/show/view.jsx +++ b/ui/page/show/view.jsx @@ -36,7 +36,7 @@ type Props = { claimIsMine: boolean, claimIsPending: boolean, isLivestream: boolean, - beginPublish: (string) => void, + beginPublish: (?string) => void, collectionId: string, collection: Collection, collectionUrls: Array, @@ -157,7 +157,7 @@ function ShowPage(props: Props) { />