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

UIDATIMP-690 prevent ESLint from dying #712

Merged
merged 3 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
* Fix `SyntaxError: Unexpected token 'export'` error when running tests (UIDATIMP-667)
* Fix "Position" in MCL View is not left justified (UIDATIMP-657)
* An error message appears when linking a match profile with Existing record field = "Identifier: ..." to a job profile (UIDATIMP-687)
* Only import MatchingFieldsManager once (UIDATIMP-689)
* Tweak syntax that caused ESLint to die early, allowing it complete, and find bugs like UIDATIMP-689 (UIDATIMP-690)

## [2.1.4](https://github.com/folio-org/ui-data-import/tree/v2.1.4) (2020-08-13)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ export const LoanAndAvailability = ({
const currentValue = circulationNotes[index]?.fields.find(item => item.name === 'noteType').value;
const isDirty = currentValue !== initialValue;

const updatedValue = circulationNotesList.find(item => `"${item.value}"` === currentValue)?.label;
const value = updatedValue ? `"${updatedValue}"` : currentValue;
const updatedValue = circulationNotesList.find(item => `"${item.value}"` === currentValue);
const updatedValueLabel = updatedValue?.label;
const value = updatedValueLabel ? `"${updatedValueLabel}"` : currentValue;

return {
value,
Expand Down