check for no employee
This commit is contained in:
parent
7d284010fb
commit
8dede994b4
|
@ -31,7 +31,7 @@ class UpdatePriceForm extends Component {
|
|||
// Get referenced price
|
||||
const priceUUID = this.props.match.params.priceUUID;
|
||||
const price =
|
||||
(employee.prices || []).filter(
|
||||
((employee || {}).prices || []).filter(
|
||||
price => price.uuid === priceUUID && !price.deleted
|
||||
)[0] || null;
|
||||
this.props.dispatch(setFormPriceAmount((price || {}).amount || ""));
|
||||
|
|
Loading…
Reference in New Issue
Block a user