From 950c67979a3348ea76e3fee47e67e4caa0e15321 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Thu, 24 Oct 2024 21:29:41 +0900 Subject: [PATCH] lint --- packages/frontend/src/components/MkChart.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/MkChart.vue b/packages/frontend/src/components/MkChart.vue index cbe08b977b..2302e6c16a 100644 --- a/packages/frontend/src/components/MkChart.vue +++ b/packages/frontend/src/components/MkChart.vue @@ -761,7 +761,8 @@ const fetchPerUserFollowingChart = async (): Promise => { const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => { return null; }); - return raw != null ? { + if (raw == null) return null; + return { series: [{ name: 'Local', type: 'area', @@ -771,14 +772,15 @@ const fetchPerUserFollowingChart = async (): Promise => { type: 'area', data: format(raw.remote.followings.total), }], - } : raw; + }; }; const fetchPerUserFollowersChart = async (): Promise => { const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => { return null; }); - return raw != null ? { + if (raw == null) return null; + return { series: [{ name: 'Local', type: 'area', @@ -788,7 +790,7 @@ const fetchPerUserFollowersChart = async (): Promise => { type: 'area', data: format(raw.remote.followers.total), }], - } : raw; + }; }; const fetchPerUserDriveChart = async (): Promise => {