Make more of the codebase conform to strict types (#10857)
This commit is contained in:
parent
7f017a84c2
commit
6a3f59cc76
45 changed files with 127 additions and 121 deletions
|
@ -76,7 +76,7 @@ export default class MessageEditHistoryDialog extends React.PureComponent<IProps
|
|||
result = await client.relations(roomId, eventId, RelationType.Replace, EventType.RoomMessage, opts);
|
||||
} catch (error) {
|
||||
// log if the server returned an error
|
||||
if (error.errcode) {
|
||||
if (error instanceof MatrixError && error.errcode) {
|
||||
logger.error("fetching /relations failed with error", error);
|
||||
}
|
||||
this.setState({ error: error as MatrixError }, () => reject(error));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue