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: state leaks in matching component #1746

Merged
merged 2 commits into from
Mar 2, 2023
Merged

fix: state leaks in matching component #1746

merged 2 commits into from
Mar 2, 2023

Conversation

TheSlimvReal
Copy link
Collaborator

@TheSlimvReal TheSlimvReal commented Feb 27, 2023

The config of the matching component is currently leaking state as modifications happen directly on the config object and are therefore affecting visits of the same site in one session.
This has been fixed by making a deep copy using JSON.parse and JSON.stringify.

Can be reproduced by

  1. go to /matching
  2. Select both entities with a distance
  3. Navigate away and back to /matching
  4. See that the distance form before is still shown in the tables and when the entity is selected. Also the distance is not updated when selecting different entities.

Visible/Frontend Changes

  • [x]
  • [ ]

Architectural/Backend Changes

  • [x]
  • [ ]

@github-actions
Copy link

Deployed to https://pr-1746.aam-digital.net/

@sonarcloud
Copy link

sonarcloud bot commented Mar 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@TheSlimvReal TheSlimvReal merged commit a0a6180 into master Mar 2, 2023
@TheSlimvReal TheSlimvReal deleted the matching_fix branch March 2, 2023 10:29
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.19.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

3 participants