Skip to content

Commit 2a0f3a9

Browse files
committed
made classname optional props
1 parent 1fed7a8 commit 2a0f3a9

File tree

1 file changed

+3
-4
lines changed
  • app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm

1 file changed

+3
-4
lines changed

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,9 @@ function LocalUnitsForm(props: Props) {
446446
const showChanges = !isNewLocalUnit && !!localUnitDetailsResponse?.is_locked;
447447

448448
const hasDifference = useMemo(() => {
449-
if (!value || !previousData) {
449+
if (isNotDefined(value) || isNotDefined(previousData)) {
450450
return false;
451451
}
452-
453452
const newFormFields = getFormFields(value);
454453
const oldFormFields = getFormFields(previousData);
455454

@@ -462,8 +461,8 @@ function LocalUnitsForm(props: Props) {
462461
onClick={handleFormSubmit}
463462
disabled={
464463
!hasDifference
465-
|| addLocalUnitsPending
466-
|| updateLocalUnitsPending
464+
|| addLocalUnitsPending
465+
|| updateLocalUnitsPending
467466
}
468467
>
469468
{strings.submitButtonLabel}

0 commit comments

Comments
 (0)