Skip to content

Commit c24de89

Browse files
committed
fix: fix linting errors created by yup update
1 parent 70dd7ed commit c24de89

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateOrganisationListItem.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ export const CreateOrganisationListItem = () => {
9191
.test(
9292
"does-not-exist-already",
9393
"The name is already used for an organisation",
94-
(name) =>
95-
name !== undefined &&
96-
!organisations?.map((organisation) => organisation.name).includes(name),
94+
(name) => !organisations?.map((organisation) => organisation.name).includes(name),
9795
)
9896
.min(2, "The name is too short"),
9997
owner: yup
@@ -102,9 +100,7 @@ export const CreateOrganisationListItem = () => {
102100
.test(
103101
"does-not-exist-already",
104102
"The name is already used for an organisation",
105-
(name) =>
106-
name !== undefined &&
107-
!organisations?.map((organisation) => organisation.name).includes(name),
103+
(name) => !organisations?.map((organisation) => organisation.name).includes(name),
108104
),
109105
})}
110106
onSubmit={async ({ name, owner }, { setSubmitting, resetForm }) => {

features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateUnitListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const CreateUnitListItem = () => {
9191
.test(
9292
"does-not-exist-already",
9393
"The name is already used for a unit",
94-
(name) => name !== undefined && !units?.map((unit) => unit.name).includes(name),
94+
(name) => !units?.map((unit) => unit.name).includes(name),
9595
)
9696
.min(2, "The name is too short"),
9797
})}

0 commit comments

Comments
 (0)