Doble check state in subscriptions

This commit is contained in:
vjrj 2018-02-19 21:20:20 +01:00
parent 8af9bec79c
commit 34e0132c46

View file

@ -20,8 +20,8 @@ class Subscriptions extends Component {
constructor(props) {
super(props);
this.t = props.t;
if (props.location.state) {
const received = props.location.state;
const received = props.location.state;
if (received && received.location && received.location.lat && received.location.lon && received.distance) {
props.history.push(`${this.props.match.url}/new`, {
location: received.location,
distance: received.distance,