fix: only use getComputedStyle with elements (#13366)

pull/13348/head
Rich Harris 2 months ago committed by GitHub
parent c5028a27c5
commit 2c98768b84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: only use getComputedStyle with elements

@ -52,7 +52,7 @@ function get_zoom(element) {
while (current !== null) { while (current !== null) {
zoom *= +getComputedStyle(current).zoom; zoom *= +getComputedStyle(current).zoom;
current = /** @type {Element | null} */ (current.parentNode); current = /** @type {Element | null} */ (current.parentElement);
} }
return zoom; return zoom;

Loading…
Cancel
Save