Skip to content

fix: error caused by loss of context when extracting waitUntil#44

Merged
HugoRCD merged 4 commits intoHugoRCD:mainfrom
saltytostitos:waituntil
Feb 7, 2026
Merged

fix: error caused by loss of context when extracting waitUntil#44
HugoRCD merged 4 commits intoHugoRCD:mainfrom
saltytostitos:waituntil

Conversation

@saltytostitos
Copy link
Contributor

@saltytostitos saltytostitos commented Feb 5, 2026

Very simple PR to address errors I'm getting extracting waitUntil.
Resolves #41

This keeps this context.

@vercel
Copy link

vercel bot commented Feb 5, 2026

@saltytostitos is attempting to deploy a commit to the HRCD Projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the bug Something isn't working label Feb 5, 2026
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Thank you for following the naming conventions! 🙏

@HugoRCD HugoRCD requested a review from Copilot February 6, 2026 12:03
@HugoRCD HugoRCD changed the title fix: fix error from loss of context extracting waitUntil fix: error caused by loss of context when extracting waitUntil Feb 6, 2026
@vercel
Copy link

vercel bot commented Feb 6, 2026

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

Project Deployment Actions Updated (UTC)
evlog-docs Ready Ready Preview, Comment Feb 7, 2026 5:55pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a runtime error when using waitUntil in development (e.g., Wrangler) by ensuring the waitUntil method is invoked with the correct this binding, preventing “Illegal invocation” errors when draining logs.

Changes:

  • Stop extracting waitUntil into a standalone function reference.
  • Invoke waitUntil as a method on its owning context object to preserve this context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 6, 2026

npm i https://pkg.pr.new/evlog@44

commit: 07edc76

@HugoRCD
Copy link
Owner

HugoRCD commented Feb 6, 2026

@saltytostitos thanks for the PR, can you pls update the tests 🙏

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HugoRCD HugoRCD merged commit 1e485ef into HugoRCD:main Feb 7, 2026
19 checks passed
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.

[bug] waitUntil error in 1.4.0 in dev

2 participants