Enable lint rules for Promise handling to discourage misuse of them. (#2607)
* Enable lint rules for Promise handling to discourage misuse of them. Squashed all of Hugh's commits into one. --------- Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
This commit is contained in:
@@ -59,9 +59,13 @@ export const RoomPage: FC = () => {
|
||||
// a URL param, automatically register a passwordless user
|
||||
if (!loading && !authenticated && displayName && !widget) {
|
||||
setIsRegistering(true);
|
||||
registerPasswordlessUser(displayName).finally(() => {
|
||||
setIsRegistering(false);
|
||||
});
|
||||
registerPasswordlessUser(displayName)
|
||||
.catch((e) => {
|
||||
logger.error("Failed to register passwordless user", e);
|
||||
})
|
||||
.finally(() => {
|
||||
setIsRegistering(false);
|
||||
});
|
||||
}
|
||||
}, [
|
||||
loading,
|
||||
|
||||
Reference in New Issue
Block a user