diff --git a/packages/torph/src/lib/text-morph/utils/animate.ts b/packages/torph/src/lib/text-morph/utils/animate.ts index 9970d78..08fe0d3 100644 --- a/packages/torph/src/lib/text-morph/utils/animate.ts +++ b/packages/torph/src/lib/text-morph/utils/animate.ts @@ -128,7 +128,11 @@ export function transitionContainerSize( pendingCleanup = null; } - if (oldWidth === 0 || oldHeight === 0) return; + if (oldWidth === 0 || oldHeight === 0) { + element.style.width = "auto"; + element.style.height = "auto"; + return; + } element.style.width = "auto"; element.style.height = "auto";