-
-
Notifications
You must be signed in to change notification settings - Fork 10
fix: error caused by loss of context when extracting waitUntil #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
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
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.
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.
Very simple PR to address errors I'm getting extracting waitUntil.
Resolves #41
This keeps
thiscontext.