mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
useMetaDetails addon uses reduce instead of || null
This commit is contained in:
parent
3bebf2f3ca
commit
bce237e916
1 changed files with 7 additions and 1 deletions
|
|
@ -53,7 +53,13 @@ const mapMetaDetailsStateWithCtx = (meta_details, ctx) => {
|
|||
})
|
||||
:
|
||||
null,
|
||||
addon: ctx.profile.addons.find((addon) => addon.transportUrl === meta_resource.request.base) || null
|
||||
addon: ctx.profile.addons.reduce((origin, addon) => {
|
||||
if (addon.transportUrl === meta_resource.request.base) {
|
||||
return addon;
|
||||
}
|
||||
|
||||
return origin;
|
||||
}, null)
|
||||
};
|
||||
});
|
||||
const streams_resources = meta_details.streams_resources.map((stream_resource) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue