Skip to content

Commit dd1f018

Browse files
committed
fix: item details crash
1 parent eb68665 commit dd1f018

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/pages/item-details/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ const ItemDetails = ({ itemID, search }) => {
337337
<CrowdfundingCard
338338
item={decodedItem || item}
339339
timestamp={timestamp}
340-
request={requests[requests.length - 1]}
340+
request={requests ? requests[requests.length - 1] : {}}
341341
/>
342342

343343
{/* Spread the `requests` parameter to convert elements from array to an object */}

src/pages/light-item-details/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ const ItemDetails = ({ itemID, search }) => {
350350
<CrowdfundingCard
351351
item={decodedItem || item}
352352
timestamp={timestamp}
353-
request={requests[requests.length - 1]}
353+
request={requests ? requests[requests.length - 1] : {}}
354354
/>
355355
{/* Spread the `requests` parameter to convert elements from array to an object */}
356356
<RequestTimelines

0 commit comments

Comments
 (0)