From 9b1f43203307b1dd2f1a2a2e6b836ba252af87ec Mon Sep 17 00:00:00 2001 From: Juan Date: Mon, 18 Nov 2024 02:28:57 -0300 Subject: [PATCH] Fix Drop from Compass without Image --- packages/drops/src/domain/Drop.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/drops/src/domain/Drop.ts b/packages/drops/src/domain/Drop.ts index d2572ef..55e134b 100644 --- a/packages/drops/src/domain/Drop.ts +++ b/packages/drops/src/domain/Drop.ts @@ -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,