From 3d7cc56f9cf9913247eac1147f81919f1d0db699 Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Sat, 28 Mar 2020 20:12:57 +0200 Subject: [PATCH] enforece same posterShape in Search rows --- src/routes/Search/useSearch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/Search/useSearch.js b/src/routes/Search/useSearch.js index 99f2d30a6..d8e9d03b5 100644 --- a/src/routes/Search/useSearch.js +++ b/src/routes/Search/useSearch.js @@ -13,11 +13,11 @@ const mapSearchStateWithCtx = (search, ctx) => { const content = catalog_resource.content.type === 'Ready' ? { type: 'Ready', - content: catalog_resource.content.content.map((metaItem) => ({ + content: catalog_resource.content.content.map((metaItem, _, metaItems) => ({ type: metaItem.type, name: metaItem.name, poster: metaItem.poster, - posterShape: metaItem.posterShape, + posterShape: metaItems[0].posterShape, href: `#/metadetails/${encodeURIComponent(metaItem.type)}/${encodeURIComponent(metaItem.id)}` // TODO this should redirect with videoId at some cases })) }