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

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 {