Address MR change requests
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user