From 3fedb4488db684059afc23e68a024df17c4085c9 Mon Sep 17 00:00:00 2001 From: ADRFranklin Date: Wed, 17 Aug 2022 18:15:36 +0100 Subject: [PATCH] fix(filters): using invalid field for networks and studios #721 --- pkg/api/src/requests/filter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/api/src/requests/filter.js b/pkg/api/src/requests/filter.js index 9e969e5bf..eea2cbf6f 100644 --- a/pkg/api/src/requests/filter.js +++ b/pkg/api/src/requests/filter.js @@ -125,8 +125,8 @@ function getValue(condition, media) { break; case "network": values = []; - if (media.networks && Array.isArray(media.networks.results)) - media.networks.results.map((nw) => { + if (media.networks && Array.isArray(media.networks)) + media.networks.map((nw) => { values.push(nw.name); }); break; @@ -134,9 +134,9 @@ function getValue(condition, media) { values = []; if ( media.production_companies && - Array.isArray(media.production_companies.results) + Array.isArray(media.production_companies) ) - media.production_companies.results.map((cp) => { + media.production_companies.map((cp) => { values.push(cp.name); }); break;