fix: error caused by loss of context when extracting waitUntil#44
fix: error caused by loss of context when extracting waitUntil#44HugoRCD merged 4 commits intoHugoRCD:mainfrom
Conversation
|
@saltytostitos is attempting to deploy a commit to the HRCD Projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for following the naming conventions! 🙏 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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
waitUntilinto a standalone function reference. - Invoke
waitUntilas a method on its owning context object to preservethiscontext.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
commit: |
|
@saltytostitos thanks for the PR, can you pls update the tests 🙏 |
There was a problem hiding this comment.
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.
Very simple PR to address errors I'm getting extracting waitUntil.
Resolves #41
This keeps
thiscontext.