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(
4
4
subPred : string ,
5
5
) : string [ ] {
6
6
if ( Array . isArray ( entry [ pred ] ) ) {
7
- return entry [ pred ] . map ( obj => obj [ subPred ] ) ;
7
+ return entry [ pred ] . map ( ( obj ) => obj [ subPred ] ) ;
8
8
}
9
9
return [ ] ;
10
10
}
Original file line number Diff line number Diff line change @@ -75,10 +75,13 @@ export async function fetchList(
75
75
thing ,
76
76
'https://schema.org/description' ,
77
77
) ,
78
- image : getJsonLdLinkOrStringField ( thing , 'https://schema.org/image' ) ,
78
+ image : getJsonLdLinkOrStringField (
79
+ thing ,
80
+ 'https://schema.org/image' ,
81
+ ) ,
79
82
name : getJsonLdStringField ( thing , 'https://schema.org/name' ) ,
80
83
sameAs : thing [ 'https://schema.org/sameAs' ] . map (
81
- ( x ) => ( x [ '@id' ] || x [ '@value' ] ) ,
84
+ ( x ) => x [ '@id' ] || x [ '@value' ] ,
82
85
) as string [ ] ,
83
86
} ,
84
87
} ) ;
@@ -95,7 +98,10 @@ export async function fetchList(
95
98
'https://schema.org/startTime' ,
96
99
) ,
97
100
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
+ ) ,
99
105
} ) ;
100
106
} else {
101
107
console . log ( 'thing type not recognised' , thing ) ;
You can’t perform that action at this time.
0 commit comments