Skip to content
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

Avoid return and callArg* clearing each other's state #2593

Merged
merged 3 commits into from Apr 25, 2024

Conversation

fatso83
Copy link
Contributor

@fatso83 fatso83 commented Apr 25, 2024

Purpose (TL;DR) - mandatory

This partially reverts changes done in #2567, as the clearing of state was a bit too invasive. It is fully possible to have functions that both call callbacks and return values, which was made impossible by this change.

I kept the tests, which proves this fix is not affecting the intent of the original fix, and additionally added a regression test for #2572 to make sure it keeps that way.

How to verify - mandatory

  1. Check out this branch
  2. npm install

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached.

This partially reverts commit 5fde5ae:
- we keep the tests
- revert to the old manual clearing of props

The clearing of callThrough has then been manually added to what I
deem are the relevant spots. Tests are unaltered.
@fatso83 fatso83 changed the title Avoid return and callThrough clearing each other's state Avoid return and callArg* clearing each other's state Apr 25, 2024
@fatso83 fatso83 merged commit 5025d00 into main Apr 25, 2024
10 checks passed
@fatso83 fatso83 deleted the revert-callthrough-simplifications branch April 25, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant