Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Oct 24, 2024
1 parent 0866960 commit 950c679
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/frontend/src/components/MkChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ const fetchPerUserFollowingChart = async (): Promise<typeof chartData> => {
const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => {

Check failure on line 761 in packages/frontend/src/components/MkChart.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong
return null;
});
return raw != null ? {
if (raw == null) return null;
return {
series: [{
name: 'Local',
type: 'area',
Expand All @@ -771,14 +772,15 @@ const fetchPerUserFollowingChart = async (): Promise<typeof chartData> => {
type: 'area',
data: format(raw.remote.followings.total),
}],
} : raw;
};
};
const fetchPerUserFollowersChart = async (): Promise<typeof chartData> => {
const raw = await misskeyApi('charts/user/following', { userId: props.args?.user?.id!, limit: props.limit, span: props.span }).catch(() => {

Check failure on line 779 in packages/frontend/src/components/MkChart.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong
return null;
});
return raw != null ? {
if (raw == null) return null;
return {
series: [{
name: 'Local',
type: 'area',
Expand All @@ -788,7 +790,7 @@ const fetchPerUserFollowersChart = async (): Promise<typeof chartData> => {
type: 'area',
data: format(raw.remote.followers.total),
}],
} : raw;
};
};
const fetchPerUserDriveChart = async (): Promise<typeof chartData> => {
Expand Down

0 comments on commit 950c679

Please sign in to comment.