fix routing for /admin/

This commit is contained in:
Eduard Heimbuch
2019-06-24 15:13:04 +02:00
parent 87cf34dd31
commit 207390bdad

View File

@@ -27,7 +27,10 @@ type Props = {
class Admin extends React.Component<Props> {
stripEndingSlash = (url: string) => {
if (url.endsWith("/")) {
return url.substring(0, url.length - 2);
if(url.includes("role")) {
return url.substring(0, url.length - 2);
}
return url.substring(0, url.length - 1);
}
return url;
};