0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-07 09:51:06 +01:00

Fix SVG height calculation in diff viewer (#36748) (#36750)

Backport #36748 by POPSuL

Fixes #36742

Co-authored-by: Viktor Suprun <popsul1993@gmail.com>
This commit is contained in:
Giteabot 2026-02-26 00:46:35 +08:00 committed by GitHub
parent 00566cc953
commit 19e36e8a70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ function getDefaultSvgBoundsIfUndefined(text: string, src: string) {
const viewBox = svg.viewBox.baseVal;
return {
width: defaultSize,
height: defaultSize * viewBox.width / viewBox.height,
height: defaultSize * viewBox.height / viewBox.width,
};
}
return {