Enable lint rules for Promise handling to discourage misuse of them.

Squashed all of Hugh's commits into one.
This commit is contained in:
Hugh Nimmo-Smith
2024-07-10 16:20:59 +01:00
committed by Timo
parent c2cc0937c1
commit 480a995be1
31 changed files with 332 additions and 198 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
import { FC, useCallback, useEffect, useMemo, useRef } from "react";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger";
import { useProfile } from "../profile/useProfile";
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
@@ -70,6 +71,8 @@ export const ProfileSettingsTab: FC<Props> = ({ client }) => {
// @ts-ignore
avatar: avatar && avatarSize > 0 ? avatar : undefined,
removeAvatar: removeAvatar.current && (!avatar || avatarSize === 0),
}).catch((e) => {
logger.error("Failed to save profile", e);
});
}
};