Conform more of the codebase to strictNullChecks (#11134)

This commit is contained in:
Michael Telatynski 2023-06-27 17:39:56 +01:00 committed by GitHub
parent 3d886de5b0
commit e1cad41bc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 44 additions and 36 deletions

View file

@ -1704,7 +1704,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
} catch (error) {
logger.error(`Failed to reject invite: ${error}`);
const msg = error.message ? error.message : JSON.stringify(error);
const msg = error instanceof Error ? error.message : JSON.stringify(error);
Modal.createDialog(ErrorDialog, {
title: _t("Failed to reject invite"),
description: msg,