Make useProfile() use of undefined explicit

This commit is contained in:
Daniel Abramov 2023-07-03 18:26:44 +01:00
parent 333b7cc041
commit caa3a7e8d0

View File

@ -38,7 +38,7 @@ type ProfileSaveCallback = ({
removeAvatar: boolean;
}) => Promise<void>;
export function useProfile(client?: MatrixClient) {
export function useProfile(client: MatrixClient | undefined) {
const [{ success, loading, displayName, avatarUrl, error }, setState] =
useState<ProfileLoadState>(() => {
let user: User | undefined = undefined;