From be8afa7aa3fd1c8922a4e02e16cdfef698b3df26 Mon Sep 17 00:00:00 2001 From: Zog Date: Thu, 21 Dec 2017 15:47:29 +0100 Subject: Refs #5361 @1H; Make company optional in Lines form And handle the case when it is nil in the views --- app/javascript/vehicle_journeys/components/Tools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/vehicle_journeys/components/Tools.js b/app/javascript/vehicle_journeys/components/Tools.js index 7621dfc10..1ef576529 100644 --- a/app/javascript/vehicle_journeys/components/Tools.js +++ b/app/javascript/vehicle_journeys/components/Tools.js @@ -17,7 +17,7 @@ export default class Tools extends Component { hasPolicy(key) { // Check if the user has the policy to disable or not the action - return this.props.filters.policy[`vehicle_journeys.${key}`] + return this.props.filters.policy[`vehicle_journeys.${key}`] } render() { @@ -45,4 +45,4 @@ Tools.propTypes = { vehicleJourneys : PropTypes.array.isRequired, onCancelSelection: PropTypes.func.isRequired, filters: PropTypes.object.isRequired -} \ No newline at end of file +} -- cgit v1.2.3