a tool for shared writing and social publishing

fix prop access issue

Changed files
+2 -2
src
+2 -2
src/utils/getPublicationMetadataFromLeafletData.ts
··· 29 29 | null = 30 30 data?.leaflets_in_publications?.[0] || 31 31 data?.permission_token_rights[0].entity_sets?.permission_tokens?.find( 32 - (p) => p.leaflets_in_publications.length, 32 + (p) => p.leaflets_in_publications?.length, 33 33 )?.leaflets_in_publications?.[0]; 34 34 35 35 // If not found, check for standalone documents 36 36 let standaloneDoc = 37 37 data?.leaflets_to_documents?.[0] || 38 38 data?.permission_token_rights[0].entity_sets?.permission_tokens.find( 39 - (p) => p.leaflets_to_documents.length, 39 + (p) => p.leaflets_to_documents?.length, 40 40 )?.leaflets_to_documents?.[0]; 41 41 if (!pubData && standaloneDoc) { 42 42 // Transform standalone document data to match the expected format