Handle missing env in mixin
This commit is contained in:
parent
b5de0b582c
commit
9c4320e94a
|
|
@ -7,7 +7,11 @@ export default {
|
||||||
mutation: LOGOUT_MUTATION,
|
mutation: LOGOUT_MUTATION,
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
if (data.logout.success) {
|
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(`/`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue