Fix code to be equivalent to the previous one

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-09-25 07:55:40 +02:00
parent 27f74b3ebd
commit 1a2476609c
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D
1 changed files with 13 additions and 10 deletions

View File

@ -24,8 +24,10 @@ function remoteRender(event: MessageEvent): void {
// Apply image style after so we can steal the anchor's colour.
// Style copied from a rendered version of mx_MFileBody_download_icon
if (data.imgStyle) {
// @ts-ignore
img.style = data.imgStyle ?? "";
img.style = data.imgStyle;
} else {
img.style.width = "12px";
img.style.height = "12px";
img.style.webkitMaskSize = "12px";
@ -34,6 +36,7 @@ function remoteRender(event: MessageEvent): void {
img.style.display = "inline-block";
img.style.webkitMaskImage = `url('${data.imgSrc}')`;
img.style.backgroundColor = `${a.style.color}`;
}
const body = document.body;
// Don't display scrollbars if the link takes more than one line to display.