From 8dede994b44fe4a354f98737ede188aeb326ac6a Mon Sep 17 00:00:00 2001 From: Alexander Wong Date: Wed, 7 Feb 2018 16:06:45 -0700 Subject: [PATCH] check for no employee --- src/components/User/Client/UpdatePriceForm.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/User/Client/UpdatePriceForm.jsx b/src/components/User/Client/UpdatePriceForm.jsx index a3994b6..38ccbbc 100644 --- a/src/components/User/Client/UpdatePriceForm.jsx +++ b/src/components/User/Client/UpdatePriceForm.jsx @@ -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 || ""));