diff --git a/components/cycle-day/symptoms/symptom-view.js b/components/cycle-day/symptoms/symptom-view.js index bd8214e..ec8a5c5 100644 --- a/components/cycle-day/symptoms/symptom-view.js +++ b/components/cycle-day/symptoms/symptom-view.js @@ -44,11 +44,17 @@ export default class SymptomView extends Component { } isDeleteIconActive() { - return Object.keys(this.state).some(key => { + const symptomValueHasBeenFilledOut = key => { + // the state tracks whether the symptom info should be shown, + // we ignore that property if (key === 'showInfo') return // is there any meaningful value in the current state? return this.state[key] || this.state[key] === 0 - }) + } + + const symptomValues = Object.keys(this.state) + + return symptomValues.some(symptomValueHasBeenFilledOut) } render() {