Skip to content

Commit

Permalink
Implement PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi committed Nov 28, 2024
1 parent 0c43941 commit b682a3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
20 changes: 1 addition & 19 deletions db/model/Gdoc/GdocBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,25 +255,7 @@ export class GdocBase implements OwidGdocBaseInterface {
.map((author) => author.featuredImage)
.filter((filename) => !!filename) as string[]

const peopleImages = new Set<string>()
for (const enrichedBlockSource of this.enrichedBlockSources) {
for (const block of enrichedBlockSource) {
traverseEnrichedBlock(block, (block) => {
if (block.type === "people") {
for (const person of block.items) {
if (person.image) peopleImages.add(person.image)
}
}
})
}
}

return [
...this.filenames,
...featuredImages,
...featuredAuthorImages,
...peopleImages,
]
return [...this.filenames, ...featuredImages, ...featuredAuthorImages]
}

get linkedKeyIndicatorSlugs(): string[] {
Expand Down
2 changes: 1 addition & 1 deletion db/model/Gdoc/rawToEnriched.ts
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ const parsePeople = (raw: RawBlockPeople): EnrichedBlockPeople => {

if (typeof raw.value === "string")
return createError({
message: "Value is a string, not an array of people",
message: "Value is a string, not a list of {.person} blocks",
})

return {
Expand Down

0 comments on commit b682a3d

Please sign in to comment.