From eab3d092857a0f8e330e5e79f47dddcbdbb18a08 Mon Sep 17 00:00:00 2001 From: Ryzzzen Date: Sun, 17 Feb 2019 18:17:21 +0100 Subject: [PATCH] League of graphs: removed roles slicing --- objects/providers/LeagueofGraphs.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/objects/providers/LeagueofGraphs.js b/objects/providers/LeagueofGraphs.js index 22acff7..a2afde7 100644 --- a/objects/providers/LeagueofGraphs.js +++ b/objects/providers/LeagueofGraphs.js @@ -13,12 +13,8 @@ class LeagueofGraphsProvider extends Provider { let data = { roles: {} }; let roles = gameMode === 'ARAM' ? ['ARAM'] : ['JUNGLE', 'MIDDLE', 'TOP', 'ADC', 'SUPPORT']; - if (gameMode !== 'ARAM') { - if (preferredPosition) - roles = roles.sort((a, b) => b === preferredPosition) - - roles = roles.slice(0, parseInt(Mana.getStore().get('champion-select-min-roles', 5))); - } + if (gameMode !== 'ARAM' && preferredPosition) + roles = roles.sort((a, b) => b === preferredPosition) for (let x of roles) { console.log(2, `[ProviderHandler] [League of Graphs] Gathering data (${x})`);