Skip to content

Commit 82e110c

Browse files
author
yezihaohao
authored
Merge pull request yezihaohao#18 from brickspert/master
fixed router auth bug
2 parents 8265443 + 7b4ac23 commit 82e110c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default class CRouter extends Component {
3838
requireAuth = (permission, component) => {
3939
const { store } = this.props;
4040
const { auth } = store.getState().httpData;
41-
if (!auth || !auth.data.permissions.includes(permission)) window.location.hash = '/404';
41+
if (!auth || !auth.data.permissions.includes(permission)) hashHistory.replace('/404');
4242
return component;
4343
};
4444
render() {

0 commit comments

Comments
 (0)