mirror of
https://github.com/directus/directus.git
synced 2026-01-31 07:37:57 -05:00
Fixed issue that would prevent the m2o from working on foreign keys with no meta row (#6263)
* Fix m2o reading from optional value Fixes #6207 * Use optional chaining
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
:collection="relatedCollection.collection"
|
||||
:primary-key="currentPrimaryKey"
|
||||
:edits="edits"
|
||||
:circular-field="relation.meta.one_field"
|
||||
:circular-field="relation.meta?.one_field"
|
||||
@input="stageEdits"
|
||||
/>
|
||||
|
||||
@@ -325,7 +325,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const relatedCollection = computed(() => {
|
||||
return collectionsStore.getCollection(relation.value.related_collection)!;
|
||||
return collectionsStore.getCollection(relation.value.related_collection!)!;
|
||||
});
|
||||
|
||||
const { primaryKeyField: relatedPrimaryKeyField } = useCollection(relatedCollection.value.collection);
|
||||
|
||||
Reference in New Issue
Block a user