Don't call history.back when there is no previous history #283
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,8 @@ export function doChangePath(path) {
|
||||||
|
|
||||||
export function doHistoryBack() {
|
export function doHistoryBack() {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
|
if (!history.state) return;
|
||||||
|
|
||||||
history.back();
|
history.back();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue