Skip to content

Commit 07d8012

Browse files
[6.x] Fix sync/desync on localizable nested fields (#14335)
1 parent 12d13f7 commit 07d8012

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

resources/js/components/ui/Publish/Field.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,14 @@ const isSyncable = computed(() => {
182182
183183
const isSynced = computed(() => isSyncable.value && !localizedFields.value.includes(fullPath.value));
184184
const isNested = computed(() => fullPath.value.includes('.'));
185+
const rootFieldPath = computed(() => isNested.value ? fullPath.value.split('.')[0] : fullPath.value);
185186
186187
function sync() {
187-
syncField(fullPath.value);
188+
syncField(rootFieldPath.value);
188189
}
189190
190191
function desync() {
191-
desyncField(fullPath.value);
192+
desyncField(rootFieldPath.value);
192193
}
193194
194195
const fieldtypeComponentProps = computed(() => ({

0 commit comments

Comments
 (0)