From 59c363613956cd719f0b55cfa67b8fdbde736d62 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Mon, 20 May 2019 06:08:46 +0200 Subject: [PATCH] Don't show delete icon just because symptom info is open --- components/cycle-day/symptoms/symptom-view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/cycle-day/symptoms/symptom-view.js b/components/cycle-day/symptoms/symptom-view.js index aa19a2e..bd8214e 100644 --- a/components/cycle-day/symptoms/symptom-view.js +++ b/components/cycle-day/symptoms/symptom-view.js @@ -44,9 +44,10 @@ export default class SymptomView extends Component { } isDeleteIconActive() { - return Object.values(this.state).some(value => { + return Object.keys(this.state).some(key => { + if (key === 'showInfo') return // is there any meaningful value in the current state? - return value || value === 0 + return this.state[key] || this.state[key] === 0 }) }