Skip to content

Commit

Permalink
refactor: simplify error condition check for M_FORBIDDEN
Browse files Browse the repository at this point in the history
  • Loading branch information
domw30 committed Oct 20, 2023
1 parent 5679f47 commit ce0b3d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/chat/matrix-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class MatrixClient implements IChatClient {

return { lastSeenAt, isOnline };
} catch (error: any) {
if (error && typeof error === 'object' && error.errcode !== 'M_FORBIDDEN') {
if (error.errcode !== 'M_FORBIDDEN') {
console.error(error);
}

Expand Down

0 comments on commit ce0b3d8

Please sign in to comment.