From ce0b3d8332c246596f0032acd2a3ec4d6904aa31 Mon Sep 17 00:00:00 2001 From: dominic Date: Fri, 20 Oct 2023 14:57:06 +0100 Subject: [PATCH] refactor: simplify error condition check for M_FORBIDDEN --- src/lib/chat/matrix-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/chat/matrix-client.ts b/src/lib/chat/matrix-client.ts index 021ef6907..24e025489 100644 --- a/src/lib/chat/matrix-client.ts +++ b/src/lib/chat/matrix-client.ts @@ -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); }