Doble check state in subscriptions
This commit is contained in:
parent
8af9bec79c
commit
34e0132c46
1 changed files with 2 additions and 2 deletions
|
|
@ -20,8 +20,8 @@ class Subscriptions extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.t = props.t;
|
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`, {
|
props.history.push(`${this.props.match.url}/new`, {
|
||||||
location: received.location,
|
location: received.location,
|
||||||
distance: received.distance,
|
distance: received.distance,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue