Skip to content

Commit

Permalink
fix(handle undefined state selection)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixtedemaupeou committed May 17, 2018
1 parent cea966b commit 1821168
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { lift } from 'ramda'
import { lift, prop } from 'ramda'
import { formValueSelector } from 'redux-form'

import { selectors } from 'data'
Expand All @@ -13,7 +13,7 @@ export const getData = (state) => {
data: transform(buySellR, optionsR),
type: state.form.buySellTabStatus && state.form.buySellTabStatus.values.status,
country: formValueSelector('selectPartner')(state, 'country'),
stateSelection: formValueSelector('selectPartner')(state, 'state').code,
stateSelection: prop('code', formValueSelector('selectPartner')(state, 'state')),
email: formValueSelector('selectPartner')(state, 'email')
}
}

0 comments on commit 1821168

Please sign in to comment.