Address MR change requests

This commit is contained in:
Julia Friesel
2019-05-13 20:41:57 +02:00
parent e781919434
commit 5057e1a38e
2 changed files with 3 additions and 4 deletions
@@ -1,5 +1,4 @@
import React from 'react'
import { Component } from 'react'
import React, { Component } from 'react'
import { BackHandler, View } from 'react-native'
import { saveSymptom } from '../../../db'
import Header from '../../header/symptom-view'
@@ -8,9 +7,9 @@ import { headerTitles } from '../../../i18n/en/labels'
export default class SymptomView extends Component {
constructor(props) {
super()
// every specific symptom view provides their own onBackButtonPress method
this.backHandler = BackHandler.addEventListener('hardwareBackPress', this.onBackButtonPress.bind(this))
this.globalBackhandler = props.handleBackButtonPress
this.symptomName = props.symptomName
this.date = props.date
}
+1 -1
View File
@@ -114,7 +114,7 @@ function formatCycleForSympto(cycle) {
delete day.cervix
}
// remove days with incomplete mucus value (because nfp-mucus returns null when that's the case)
if (day.mucus.value === null) {
if (day.mucus && day.mucus.value === null) {
delete day.mucus
}
// change format