Skip to content

Commit 7b6b94a

Browse files
pnpm prettier
1 parent 0043ba4 commit 7b6b94a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

movies/vanilla/src/jsonld.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

movies/vanilla/src/movies.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)