diff --git a/src/runtime/transition/index.ts b/src/runtime/transition/index.ts index fc42ee2dcf..8f5a9521b6 100644 --- a/src/runtime/transition/index.ts +++ b/src/runtime/transition/index.ts @@ -179,8 +179,9 @@ export function draw(node: SVGElement & { getTotalLength(): number }, { easing = cubicInOut }: DrawParams = {}): TransitionConfig { let len = node.getTotalLength(); - if (getComputedStyle(node).strokeLinecap !== 'butt') { - len += parseInt(getComputedStyle(node).strokeWidth); + const style = getComputedStyle(node); + if (style.strokeLinecap !== 'butt') { + len += parseInt(style.strokeWidth); } if (duration === undefined) {