Skip to content

Commit

Permalink
fix: add null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nczitzk committed Nov 12, 2023
1 parent b16a6c1 commit fb11f9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/v2/ianspriggs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ module.exports = async (ctx) => {
}),
author,
pubDate: parseDate(item.find('div.work-info p').last(), 'YYYY'),
enclosure_url: image.prop('src'),
enclosure_type: 'image/jpeg',
enclosure_url: image?.prop('src') ?? undefined,
enclosure_type: image?.prop('src') ? 'image/jpeg' : undefined,
};
});

Expand Down

0 comments on commit fb11f9b

Please sign in to comment.