From 5bb8dca8b43b7005e094a976ad7f1f5657f431fc Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Tue, 18 Jan 2022 20:03:18 +0400 Subject: [PATCH] Fix wrapping plain text --- .env | 4 ++-- src/lib/richtextprocessor.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 0cb06bfa..4de2998a 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ API_ID=1025907 API_HASH=452b0359b988148995f22ff0f4229750 VERSION=1.0.3 -VERSION_FULL=1.0.3 (66) -BUILD=66 +VERSION_FULL=1.0.3 (68) +BUILD=68 diff --git a/src/lib/richtextprocessor.ts b/src/lib/richtextprocessor.ts index f3065e66..dc7bd982 100644 --- a/src/lib/richtextprocessor.ts +++ b/src/lib/richtextprocessor.ts @@ -901,7 +901,7 @@ namespace RichTextProcessor { /** * ! This function is still unsafe to use with .innerHTML */ - export function wrapPlainText(text: string, entities?: MessageEntity[]) { + export function wrapPlainText(text: string, entities: MessageEntity[] = []) { if(entities?.length) { entities = entities.filter(entity => entity._ === 'messageEntitySpoiler'); }