Skip to content

Commit

Permalink
fix errors after merging main
Browse files Browse the repository at this point in the history
  • Loading branch information
esizer committed Oct 2, 2024
1 parent c8e9700 commit b15769b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/playwright/tests/login-logout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test.describe("Login and logout", () => {
myAuth?: { id: string };
};
};
expect(response.data.myAuth.id).toMatch(
expect(response?.data?.myAuth?.id).toMatch(
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
);
// make sure it uses the access token
Expand Down
2 changes: 1 addition & 1 deletion apps/playwright/utils/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ const Test_RolesQueryDocument = /* GraphQL */ `
export async function getRoles(ctx: GraphQLContext): Promise<Role[]> {
const res = await ctx.post<{ roles: Role[] }>(Test_RolesQueryDocument);

return res.roles;
return res?.roles ?? [];
}
2 changes: 1 addition & 1 deletion apps/web/src/hooks/useErrorMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const useErrorMessages = (): ErrorWithMessages => {

if (isRouteErrorResponse(error) && "status" in error) {
return {
error: new Error(error.data?.message),
error: new Error(String(error.data?.message)),
messages: knownErrorMessages[error.status],
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ const ScreeningAndEvaluationPage = () => {
.then((res) => {
setCandidates(res);
})
.catch((err) => {
logger.error(err);
.catch((err: unknown) => {
logger.error(String(err));
});
}

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/utils/nameUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const wrapAbbr = (text: ReactNode, intl: IntlShape, title?: string) => {
"Message shown to user when the abbreviation text is not found.",
});
const stringifyText =
text && nodeToString(Array.isArray(text) ? text[0] : text);
text && nodeToString(Array.isArray(text) ? (text[0] as ReactNode) : text);
if (typeof stringifyText !== "string") {
return (
<abbr title={fallbackTitle}>
Expand Down

0 comments on commit b15769b

Please sign in to comment.