switch indexOf() with includes()
This commit is contained in:
parent
d7b9e4dce9
commit
ff78e14835
@ -206,7 +206,7 @@ class Settings extends Component {
|
||||
confirm={{
|
||||
callback: (() => {
|
||||
this.props.mountModal(null);
|
||||
if (location.pathname.indexOf('/users') !== -1) {
|
||||
if (location.pathname.includes('/users')) {
|
||||
router.push('/');
|
||||
}
|
||||
this.updateSettings(this.state.current);
|
||||
|
Loading…
Reference in New Issue
Block a user