From 4c18946614657a9f8955408e514172a74eacc28e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 17 Sep 2018 02:25:36 +0200 Subject: logging i --- app/client/auth/login.component.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/client/auth/login.component.js') diff --git a/app/client/auth/login.component.js b/app/client/auth/login.component.js index 3cfcb78..2ef01a6 100644 --- a/app/client/auth/login.component.js +++ b/app/client/auth/login.component.js @@ -31,7 +31,11 @@ class Login extends Component { } render(){ if (this.props.auth.isAuthenticated) { - return + let { returnTo } = this.props.auth + if (!returnTo || returnTo.match(/(login|logout|signup)/i)) { + returnTo = '/' + } + return } return (
-- cgit v1.2.3-70-g09d2