Skip to content

Commit 2c98768

Browse files
authored
fix: only use getComputedStyle with elements (#13366)
1 parent c5028a2 commit 2c98768

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/cool-yaks-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: only use getComputedStyle with elements

packages/svelte/src/animate/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function get_zoom(element) {
5252

5353
while (current !== null) {
5454
zoom *= +getComputedStyle(current).zoom;
55-
current = /** @type {Element | null} */ (current.parentNode);
55+
current = /** @type {Element | null} */ (current.parentElement);
5656
}
5757

5858
return zoom;

0 commit comments

Comments
 (0)