diff --git a/webapp/channels/src/utils/text_formatting.tsx b/webapp/channels/src/utils/text_formatting.tsx index 6c5940142b..b57c3ae1ed 100644 --- a/webapp/channels/src/utils/text_formatting.tsx +++ b/webapp/channels/src/utils/text_formatting.tsx @@ -24,7 +24,7 @@ const FORMAT_TOKEN_LIMIT = 1000; const FORMAT_TOKEN_LIMIT_ERROR = 'maximum number of tokens reached'; export function isFormatTokenLimitError(error: unknown) { - return Boolean(error && typeof error === 'object' && 'message' in error && error.message === FORMAT_TOKEN_LIMIT_ERROR); + return Boolean(error && typeof error === 'object' && 'message' in error && (error as Record).message === FORMAT_TOKEN_LIMIT_ERROR); } // Performs formatting of user posts including highlighting mentions and search terms and converting urls, hashtags,