From 70454f99124979a46cf3523ee99ef7aee7231906 Mon Sep 17 00:00:00 2001 From: yukidaruma Date: Tue, 30 Oct 2018 04:30:35 +0900 Subject: [PATCH] fixed #186 --- src/components/result-detail-card.js | 6 +++--- src/components/team-gear-table.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/result-detail-card.js b/src/components/result-detail-card.js index 3b9691e..2e10a25 100644 --- a/src/components/result-detail-card.js +++ b/src/components/result-detail-card.js @@ -293,9 +293,9 @@ class ResultDetailCard extends React.Component { }; checkGear(skills) { - const shiny = skills.subs.reduce((a, b) => { - return a && b && b.id === skills.subs[0].id; - }, true); + const shiny = skills.subs.every(sub => { + return sub && sub.id === skills.subs[0].id && sub.id !== '255'; + }); if (shiny) { if (skills.subs[0].id === skills.main.id) { return 'pure'; diff --git a/src/components/team-gear-table.js b/src/components/team-gear-table.js index d5133cd..99642d8 100644 --- a/src/components/team-gear-table.js +++ b/src/components/team-gear-table.js @@ -53,9 +53,9 @@ const AbilityCell = ({ skills }) => { const subHeight = 20; const background = '#777'; - const shiny = skills.subs.reduce((a, b) => { - return a && b && b.id === skills.subs[0].id; - }, true); + const shiny = skills.subs.every(sub => { + return sub && sub.id === skills.subs[0].id && sub.id !== '255'; + }); let bgcolor = 'darkgrey'; if (shiny) {