From caa3a7e8d06f73f060fabbd3efdf75cd78268529 Mon Sep 17 00:00:00 2001 From: Daniel Abramov Date: Mon, 3 Jul 2023 18:26:44 +0100 Subject: [PATCH] Make `useProfile()` use of `undefined` explicit --- src/profile/useProfile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/profile/useProfile.ts b/src/profile/useProfile.ts index 06294db7..2281bb1e 100644 --- a/src/profile/useProfile.ts +++ b/src/profile/useProfile.ts @@ -38,7 +38,7 @@ type ProfileSaveCallback = ({ removeAvatar: boolean; }) => Promise; -export function useProfile(client?: MatrixClient) { +export function useProfile(client: MatrixClient | undefined) { const [{ success, loading, displayName, avatarUrl, error }, setState] = useState(() => { let user: User | undefined = undefined;