Skip to content

keepLatest: keep the initial value when it starts out loading - #202

Merged
NullVoxPopuli merged 2 commits into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:nvp/keep-latest-initial
Sep 27, 2026
Merged

NullVoxPopuli merged 2 commits into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:nvp/keep-latest-initial

Conversation

@NullVoxPopuli-ai-agent

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent commented Sep 25, 2026 •

Copy link
Copy Markdown

If when() is true on the first run, keepLatest returns the value but does not save it as previous. The next run with an empty value then returns undefined, not the initial value.

Found in limber: the REPL output uses keepLatest to hold the last render while auto-render is paused. A page that loads paused went blank after the first edit.

The new tests in tests/*/tests/utils/keep-latest/js-test.ts and rendering-test.gts fail before the fix and pass after it.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 25, 2026

Copy link
Copy Markdown

@NullVoxPopuli is attempting to deploy a commit to the universal-ember Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reactive Ready Ready Preview Sep 25, 2026 6:55pm UTC

NullVoxPopuli and others added 2 commits September 27, 2026 15:58
If `when()` was true on the first run, keepLatest returned the value
without saving it as `previous`. The next run with an empty value then
returned undefined instead of the initial value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Sep 27, 2026
@NullVoxPopuli
NullVoxPopuli merged commit 5298330 into universal-ember:main Sep 27, 2026
33 of 35 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants