Skip to content

Commit a888d5c

Browse files
authored
chore(ui): var name typo in relationship field (#13295)
Fixes typo in variable name within the relationship field component. `disableFormModication` → `disableFormModification`
1 parent 7234924 commit a888d5c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/ui/src/fields/Relationship/index.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
7474
return
7575
}
7676

77-
let disableFormModication = false
77+
let disableFormModification = false
7878
if (isPolymorphic) {
79-
disableFormModication =
79+
disableFormModification =
8080
Array.isArray(value) &&
8181
Array.isArray(newValue) &&
8282
value.length === newValue.length &&
@@ -85,7 +85,7 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
8585
return val.value === newVal.value && val.relationTo === newVal.relationTo
8686
})
8787
} else {
88-
disableFormModication =
88+
disableFormModification =
8989
Array.isArray(value) &&
9090
Array.isArray(newValue) &&
9191
value.length === newValue.length &&
@@ -99,7 +99,8 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
9999
return val.value
100100
}
101101
})
102-
setValue(dataToSet, disableFormModication)
102+
103+
setValue(dataToSet, disableFormModification)
103104
},
104105
[isPolymorphic, setValue, value],
105106
)
@@ -111,19 +112,19 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
111112
return
112113
}
113114

114-
let disableFormModication = false
115+
let disableFormModification = false
115116
if (isPolymorphic) {
116-
disableFormModication =
117+
disableFormModification =
117118
value &&
118119
newValue &&
119120
(value as PolymorphicRelationValue).value === newValue.value &&
120121
(value as PolymorphicRelationValue).relationTo === newValue.relationTo
121122
} else {
122-
disableFormModication = value && newValue && value === newValue.value
123+
disableFormModification = value && newValue && value === newValue.value
123124
}
124125

125126
const dataToSet = isPolymorphic ? newValue : newValue.value
126-
setValue(dataToSet, disableFormModication)
127+
setValue(dataToSet, disableFormModification)
127128
},
128129
[isPolymorphic, setValue, value],
129130
)

0 commit comments

Comments
 (0)