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

NickAkhmetov/HMP-389 Hotfix lint issues #3258

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Conversation

NickAkhmetov
Copy link
Collaborator

This PR fixes the lint issues that slipped through when I merged in HMP-389; since that branch was opened before updates to lint packages were added, CI did not pick up these issues earlier.

@NickAkhmetov
Copy link
Collaborator Author

Note I made these same fixes in 3215; if we are ready to merge that work in, this branch can be closed.

@@ -38,7 +38,7 @@ function AutocompleteEntity({ targetEntity, setter }: AutocompleteEntityProps) {
const { data, isLoading } = useAutocompleteQuery({ targetEntity, substring });

// Include currently selected options to avoid invalid value errors in console
const options = selectedOptions.concat(data || []);
const options = selectedOptions.concat(data ?? []);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this out of precaution against potentially falsy data or did you notice data that necessitated this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data is initially undefined when the page first loads. I added a console.log(data) call to demonstrate:

image

@NickAkhmetov NickAkhmetov merged commit 4bfb8bb into main Sep 13, 2023
@NickAkhmetov NickAkhmetov deleted the hotfix/main-lint-issues branch September 13, 2023 18:33
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.

2 participants