From 10f4ca27a73b3502f702416f17f881ef1ca6e8e1 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Tue, 8 Nov 2022 03:44:00 +0400 Subject: [PATCH] Fix wrapping video into aspecter --- src/components/wrappers/photo.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/wrappers/photo.ts b/src/components/wrappers/photo.ts index f9282a874..3117751b4 100644 --- a/src/components/wrappers/photo.ts +++ b/src/components/wrappers/photo.ts @@ -161,6 +161,8 @@ export default async function wrapPhoto({photo, message, container, boxWidth, bo } // } + ret.aspecter = aspecter; + if((size?._ === 'photoSizeEmpty' && isDocument) || (size as PhotoSize.photoStrippedSize)?.bytes) { return ret; } @@ -285,7 +287,6 @@ export default async function wrapPhoto({photo, message, container, boxWidth, bo ret.loadPromises.thumb = loadThumbPromise; ret.loadPromises.full = loadPromise || Promise.resolve(); ret.preloader = preloader; - ret.aspecter = aspecter; // const elapsedTime = performance.now() - perf; // if(elapsedTime > 4) {