player page: goback only if backstack available, go to homepage if not

fix invalid api request when creating new actor
This commit is contained in:
lukas committed 2021-08-28 22:21:51 +02:00
1 parent 032b90a93d
commit f8dbadc45b
2 files changed
+10 -5

No files matched your search

+6 -1
View File
@@ -314,7 +314,12 @@ export class Player extends React.Component<Props, mystate> {
* calls callback to viewbinding to show previous page agains
*/
closebtn(): void {
this.props.history.goBack();
const hist = this.props.history;
if (hist.length > 1) {
this.props.history.goBack();
} else {
hist.push('/');
}
}
/**