Skip to content

Commit

Permalink
Fixed wordpress thumbnail (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
JexSrs authored Oct 22, 2023
1 parent 7e099b4 commit f798c3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unistudents/saffron",
"version": "5.0.0",
"version": "5.0.1",
"description": "A fairly intuitive & powerful framework that enables you to collect & save articles and news from all over the web. ",
"license": "MIT",
"homepage": "https://github.com/unistudents/saffron#readme",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/parsers/wordpress.v2.parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class WordpressV2Parser extends ParserClass {

// Thumbnail
const thumbnailSize = instructions.wp.articles!.thumbnail!;
article.thumbnail = p._embedded?.['wp:featuredmedia']?.[0]?.media_details?.sizes[thumbnailSize]?.source_url;
article.thumbnail = p._embedded?.['wp:featuredmedia']?.[0]?.media_details?.sizes?.[thumbnailSize]?.source_url;

let include: string[] = instructions.wp.articles!.include!;
// The date the object was last modified.
Expand Down

0 comments on commit f798c3f

Please sign in to comment.