@@ -74,9 +74,9 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
74
74
return
75
75
}
76
76
77
- let disableFormModication = false
77
+ let disableFormModification = false
78
78
if ( isPolymorphic ) {
79
- disableFormModication =
79
+ disableFormModification =
80
80
Array . isArray ( value ) &&
81
81
Array . isArray ( newValue ) &&
82
82
value . length === newValue . length &&
@@ -85,7 +85,7 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
85
85
return val . value === newVal . value && val . relationTo === newVal . relationTo
86
86
} )
87
87
} else {
88
- disableFormModication =
88
+ disableFormModification =
89
89
Array . isArray ( value ) &&
90
90
Array . isArray ( newValue ) &&
91
91
value . length === newValue . length &&
@@ -99,7 +99,8 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
99
99
return val . value
100
100
}
101
101
} )
102
- setValue ( dataToSet , disableFormModication )
102
+
103
+ setValue ( dataToSet , disableFormModification )
103
104
} ,
104
105
[ isPolymorphic , setValue , value ] ,
105
106
)
@@ -111,19 +112,19 @@ const RelationshipFieldComponent: RelationshipFieldClientComponent = (props) =>
111
112
return
112
113
}
113
114
114
- let disableFormModication = false
115
+ let disableFormModification = false
115
116
if ( isPolymorphic ) {
116
- disableFormModication =
117
+ disableFormModification =
117
118
value &&
118
119
newValue &&
119
120
( value as PolymorphicRelationValue ) . value === newValue . value &&
120
121
( value as PolymorphicRelationValue ) . relationTo === newValue . relationTo
121
122
} else {
122
- disableFormModication = value && newValue && value === newValue . value
123
+ disableFormModification = value && newValue && value === newValue . value
123
124
}
124
125
125
126
const dataToSet = isPolymorphic ? newValue : newValue . value
126
- setValue ( dataToSet , disableFormModication )
127
+ setValue ( dataToSet , disableFormModification )
127
128
} ,
128
129
[ isPolymorphic , setValue , value ] ,
129
130
)
0 commit comments