Checks for loaded collection on item submission form.

This commit is contained in:
mateuswetah 2024-01-02 16:28:26 -03:00
parent f3d1f8f798
commit abdbf2fb4e
2 changed files with 2 additions and 2 deletions

View File

@ -1879,7 +1879,7 @@ export default {
},
getMetadatumOrderInSection(sectionIndex, metadatum) {
if ( !Array.isArray(this.collection['metadata_section_order']) || !this.collection['metadata_section_order'][sectionIndex] || !Array.isArray(this.collection['metadata_section_order'][sectionIndex]['metadata_order']) )
if ( !this.collection || !Array.isArray(this.collection['metadata_section_order']) || !this.collection['metadata_section_order'][sectionIndex] || !Array.isArray(this.collection['metadata_section_order'][sectionIndex]['metadata_order']) )
return -1;
let enabledMetadata = [];

View File

@ -1214,7 +1214,7 @@ export default {
},
getMetadatumOrderInSection(sectionIndex, metadatum) {
if ( !Array.isArray(this.collection['metadata_section_order']) || !this.collection['metadata_section_order'][sectionIndex] || !Array.isArray(this.collection['metadata_section_order'][sectionIndex]['metadata_order']) )
if ( !this.collection || !Array.isArray(this.collection['metadata_section_order']) || !this.collection['metadata_section_order'][sectionIndex] || !Array.isArray(this.collection['metadata_section_order'][sectionIndex]['metadata_order']) )
return -1;
let enabledMetadataInSection = [];