We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8265443 + 7b4ac23 commit 82e110cCopy full SHA for 82e110c
src/routes/index.js
@@ -38,7 +38,7 @@ export default class CRouter extends Component {
38
requireAuth = (permission, component) => {
39
const { store } = this.props;
40
const { auth } = store.getState().httpData;
41
- if (!auth || !auth.data.permissions.includes(permission)) window.location.hash = '/404';
+ if (!auth || !auth.data.permissions.includes(permission)) hashHistory.replace('/404');
42
return component;
43
};
44
render() {
0 commit comments