test data type for position

pull/403/head
Rebecca-Chou 9 months ago
parent f09580151f
commit 3dbc1efe39
  1. 3
      lib/members.ts

@ -43,8 +43,7 @@ export async function getMembers(year: string, term: Term): Promise<Member[]> {
return {
name: item.cn as string,
id: item.uid as string,
program:
item.position === undefined ? "" : (item.position[0] as string),
program: item.position === undefined ? "" : typeof item.position,
};
})
.filter((item: Member) => item.program !== "");

Loading…
Cancel
Save