diff --git a/CHANGELOG.md b/CHANGELOG.md index 17fb613e5..494125a1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,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) diff --git a/src/settings/MappingProfiles/detailsSections/edit/ItemDetailSection/LoanAndAvailability.js b/src/settings/MappingProfiles/detailsSections/edit/ItemDetailSection/LoanAndAvailability.js index 945616d64..9db6de0ea 100644 --- a/src/settings/MappingProfiles/detailsSections/edit/ItemDetailSection/LoanAndAvailability.js +++ b/src/settings/MappingProfiles/detailsSections/edit/ItemDetailSection/LoanAndAvailability.js @@ -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,