Skip to content

Commit b652c0a

Browse files
fix(runtime): show elements at exact end of their duration (inclusive boundary) (#1166)
Visibility check used strict less-than (currentTime < end), hiding elements at exactly t=duration. Changed to <= so the last frame renders the final animation state.
1 parent 248f640 commit b652c0a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/src/runtime/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ export function initSandboxRuntimeModular(): void {
14131413
duration != null && duration > 0 ? start + duration : Number.POSITIVE_INFINITY;
14141414
const isVisibleNow =
14151415
state.currentTime >= start &&
1416-
(Number.isFinite(computedEnd) ? state.currentTime < computedEnd : true);
1416+
(Number.isFinite(computedEnd) ? state.currentTime <= computedEnd : true);
14171417
rawNode.style.visibility = isVisibleNow ? "visible" : "hidden";
14181418
}
14191419
};

0 commit comments

Comments
 (0)