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 undefined ref errors in {val}ToLinkMap callbacks #1130

Merged

Conversation

letsbelopez
Copy link
Contributor

Problem

There were errors when trying to reference a value in a callback function where the value was undefined because it was not referencing the correct variable name that was defined in the variable statements part of the components.

Solution

I updated how the reference was created so it is referencing the correct var name.

Additional Notes

In general I worked on simplifying the code of creating the Records value name to make sure it's consistent across each use case that needs that variable name.

Links

Ticket

GitHub issue:

Other links

Verification

Manual tests

I updates all the snapshots and went through all the snapshots changes to make sure the references to all the name changes were pointing to the correct variable.

Automated tests

  • Unit tests added/updated
  • E2E tests added/updated
  • N/A - (provide a reason)
  • deferred - (provide GitHub issue for tracking)

Housekeeping

  • No non-essential console logs
  • All new files contain license notice

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@letsbelopez letsbelopez requested a review from a team as a code owner October 26, 2023 21:05
@codecov-commenter
Copy link

Codecov Report

Merging #1130 (ece6ef2) into tagged-release/nohooks-patch (6bd127c) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Impacted file tree graph

@@                       Coverage Diff                        @@
##           tagged-release/nohooks-patch    #1130      +/-   ##
================================================================
- Coverage                         94.00%   94.00%   -0.01%     
================================================================
  Files                               125      125              
  Lines                              5957     5951       -6     
  Branches                           1822     1817       -5     
================================================================
- Hits                               5600     5594       -6     
  Misses                              339      339              
  Partials                             18       18              
Files Coverage Δ
.../forms/form-renderer-helper/event-handler-props.ts 99.16% <100.00%> (ø)
...react/lib/forms/form-renderer-helper/form-state.ts 98.94% <100.00%> (ø)
...act/lib/forms/form-renderer-helper/model-values.ts 92.48% <100.00%> (ø)
...act/lib/forms/form-renderer-helper/relationship.ts 93.15% <100.00%> (ø)
...b/forms/form-renderer-helper/render-array-field.ts 100.00% <ø> (ø)
.../codegen-ui-react/lib/forms/react-form-renderer.ts 96.77% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bd127c...ece6ef2. Read the comment docs.

@letsbelopez letsbelopez merged commit 21f597e into tagged-release/nohooks-patch Oct 26, 2023
9 checks passed
@letsbelopez letsbelopez deleted the fix-callback-undefined-ref-errors branch October 26, 2023 23:39
letsbelopez added a commit that referenced this pull request Oct 30, 2023
Co-authored-by: David Lopez <lopezbnd@amazon.com>
letsbelopez added a commit that referenced this pull request Oct 30, 2023
Co-authored-by: David Lopez <lopezbnd@amazon.com>
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

4 participants