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

fix #2589: avoid invoking getter as side-effect #2592

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

fatso83
Copy link
Contributor

@fatso83 fatso83 commented Apr 25, 2024

Purpose (TL;DR) - mandatory

Fix the issue in #2589 by checking for the odd case where we actually force setting a value through accessor functions and only look up the value at that time.

The alternative would be more elaborate, check if the descriptor had a get or a value field, and then decide, but this should do the trick.

How to verify - mandatory

  1. Check out this branch
  2. npm install
  3. npm test

Checklist for author

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

of creating restorerer function. Check for the odd case
where we actually force setting a value through accessor
functions and only look up the value at that time.

The alternative would be more elaborate, check if the
descriptor had a `get` or a `value` field, and then
decide, but this should do the trick.
@fatso83 fatso83 merged commit ec4d592 into main Apr 25, 2024
10 checks passed
@fatso83 fatso83 deleted the fix-2589-direct-access-with-side-effect branch April 25, 2024 12:30
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.

1 participant