switch indexOf() with includes()

This commit is contained in:
KDSBrowne 2018-02-08 07:14:00 -08:00
parent d7b9e4dce9
commit ff78e14835

View File

@ -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);