Editing: fix clearing webpage

This commit is contained in:
Eduard Kuzmenko 2022-02-27 14:07:07 +02:00
parent 21e0d09446
commit 583e43216c

View File

@ -1794,7 +1794,7 @@ export default class ChatInput {
this.undoHistory.length = 0; this.undoHistory.length = 0;
} }
const urlEntities: Array<MessageEntity.messageEntityUrl | MessageEntity.messageEntityTextUrl> = !this.editMessage?.media && entities.filter(e => e._ === 'messageEntityUrl' || e._ === 'messageEntityTextUrl') as any; const urlEntities: Array<MessageEntity.messageEntityUrl | MessageEntity.messageEntityTextUrl> = (!this.editMessage?.media || this.editMessage.media._ === 'messageMediaWebPage') && entities.filter(e => e._ === 'messageEntityUrl' || e._ === 'messageEntityTextUrl') as any;
if(urlEntities.length) { if(urlEntities.length) {
for(const entity of urlEntities) { for(const entity of urlEntities) {
let url: string; let url: string;