From 031622c5fe669c3fec07c2cc320c141c96b7a2d0 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 20 Sep 2024 23:49:52 +0800 Subject: fix: trivial case for DOMRect animation --- src/utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 = {}) => { const dx = x1 - x2; const dy = y1 - y2; - if (dx === 0 && dy === 0) { + if (dx === 0 && dy === 0 || rw === Infinity || rh === Infinity) { return; } -- cgit v1.2.3-70-g09d2