Skip to content

Commit

Permalink
Add check for router to avoid filter not being properly handled
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Siviero committed Jul 13, 2018
1 parent ad03f1a commit 8b30e02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/View/Location.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ module.exports = React.createClass({

handleChangeFilter: function(filters){
const fil = filters.filter(a => a.type !== 'location')
this.props.router.setParams(fil);
if (this.props.router) {
this.props.router.setParams(fil);
}
this.setState({filters: filters});
},

Expand Down

0 comments on commit 8b30e02

Please sign in to comment.