diff --git a/client/src/mixins/logout.js b/client/src/mixins/logout.js index 6982bc95..a7939d22 100644 --- a/client/src/mixins/logout.js +++ b/client/src/mixins/logout.js @@ -7,7 +7,11 @@ export default { mutation: LOGOUT_MUTATION, }).then(({data}) => { if (data.logout.success) { - location.replace(`https://sso.hep-verlag.ch/logout?return_to=${process.env.LOGOUT_REDIRECT_URL}`); + if (process.env.LOGOUT_REDIRECT_URL) { + location.replace(`https://sso.hep-verlag.ch/logout?return_to=${process.env.LOGOUT_REDIRECT_URL}`); + } else { + location.replace(`/`); + } } }); }