Skip to content

Commit

Permalink
Fix Drop from Compass without Image
Browse files Browse the repository at this point in the history
  • Loading branch information
jm42 committed Nov 18, 2024
1 parent b7864a2 commit 9b1f432
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/drops/src/domain/Drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ export class Drop {
original: response.image_url,
};

if (!response.drop_image) {
return defaultImage;
}

return (
response.drop_image?.gateways.reduce(
response.drop_image?.gateways?.reduce(
(images, gateway) => ({
...images,
[gateway.type.toLowerCase()]: gateway.url,
Expand Down

0 comments on commit 9b1f432

Please sign in to comment.