Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Duplicate unsaved field opts #1488
base: master
Are you sure you want to change the base?
Duplicate unsaved field opts #1488
Changes from 11 commits
82dc9db
3230fc9
9ddd399
c3fabce
b4634a0
b139f22
07c1460
8608da6
85f56fd
97bfaf8
8cf8478
1642c9b
0eae7b6
4735b6c
e29dc28
4abc8a3
e88a543
8736115
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The
maybeDuplicateUnsavedOptions
function is well-documented and its purpose is clear. It checks for the presence of options containers for both the original and new fields before proceeding with the duplication of options. This is a good practice as it ensures that the function operates only when necessary, potentially avoiding errors or unintended behavior.However, there's an opportunity to improve error handling and logging. In scenarios where the options containers are not found or the data keys are missing, silently returning might make debugging difficult if the duplication does not work as expected.
Consider adding console warnings or logging to help identify when the function exits early due to missing containers or data keys. This could be invaluable for debugging purposes.