Skip to content

Commit 2591c36

Browse files
authored
fix: explicitly construct Number from window zoom attribute (#5600)
1 parent ed87e6d commit 2591c36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layer/font_metrics.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class FontMetrics {
145145

146146
$getZoom(element) {
147147
if (!element || !element.parentElement) return 1;
148-
return (window.getComputedStyle(element)["zoom"] || 1) * this.$getZoom(element.parentElement);
148+
return (Number(window.getComputedStyle(element)["zoom"]) || 1) * this.$getZoom(element.parentElement);
149149
}
150150

151151
$initTransformMeasureNodes() {

0 commit comments

Comments
 (0)