aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-09-20 23:49:52 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-09-20 23:49:52 +0800
commit031622c5fe669c3fec07c2cc320c141c96b7a2d0 (patch)
tree999630df332fc0429ddbe2961cd2a0e5e83623d8
parentb429f833207988cc3866953f8e4f221091fbde2c (diff)
fix: trivial case for DOMRect animation
-rw-r--r--src/utils.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.mjs b/src/utils.mjs
index e694d4a..f30178a 100644
--- a/src/utils.mjs
+++ b/src/utils.mjs
@@ -42,7 +42,7 @@ export const animateRectTransition = (element, rect, options = {}) => {
42 const dx = x1 - x2; 42 const dx = x1 - x2;
43 const dy = y1 - y2; 43 const dy = y1 - y2;
44 44
45 if (dx === 0 && dy === 0) { 45 if (dx === 0 && dy === 0 || rw === Infinity || rh === Infinity) {
46 return; 46 return;
47 } 47 }
48 48