Skip to content

Commit

Permalink
fix: only use getComputedStyle with elements (#13366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Sep 23, 2024
1 parent c5028a2 commit 2c98768
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cool-yaks-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

fix: only use getComputedStyle with elements
2 changes: 1 addition & 1 deletion packages/svelte/src/animate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function get_zoom(element) {

while (current !== null) {
zoom *= +getComputedStyle(current).zoom;
current = /** @type {Element | null} */ (current.parentNode);
current = /** @type {Element | null} */ (current.parentElement);
}

return zoom;
Expand Down

0 comments on commit 2c98768

Please sign in to comment.