File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function getJsonLdFields(
44 subPred : string ,
55) : string [ ] {
66 if ( Array . isArray ( entry [ pred ] ) ) {
7- return entry [ pred ] . map ( obj => obj [ subPred ] ) ;
7+ return entry [ pred ] . map ( ( obj ) => obj [ subPred ] ) ;
88 }
99 return [ ] ;
1010}
Original file line number Diff line number Diff line change @@ -75,10 +75,13 @@ export async function fetchList(
7575 thing ,
7676 'https://schema.org/description' ,
7777 ) ,
78- image : getJsonLdLinkOrStringField ( thing , 'https://schema.org/image' ) ,
78+ image : getJsonLdLinkOrStringField (
79+ thing ,
80+ 'https://schema.org/image' ,
81+ ) ,
7982 name : getJsonLdStringField ( thing , 'https://schema.org/name' ) ,
8083 sameAs : thing [ 'https://schema.org/sameAs' ] . map (
81- ( x ) => ( x [ '@id' ] || x [ '@value' ] ) ,
84+ ( x ) => x [ '@id' ] || x [ '@value' ] ,
8285 ) as string [ ] ,
8386 } ,
8487 } ) ;
@@ -95,7 +98,10 @@ export async function fetchList(
9598 'https://schema.org/startTime' ,
9699 ) ,
97100 endTime : getJsonLdDateField ( thing , 'https://schema.org/endTime' ) ,
98- listingId : getJsonLdLinkOrStringField ( thing , 'https://schema.org/object' ) ,
101+ listingId : getJsonLdLinkOrStringField (
102+ thing ,
103+ 'https://schema.org/object' ,
104+ ) ,
99105 } ) ;
100106 } else {
101107 console . log ( 'thing type not recognised' , thing ) ;
You can’t perform that action at this time.
0 commit comments