fix(front): avoid crashing if we don't have configuration data in time when in guard

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-08-02 10:06:06 +02:00
parent da70427e32
commit 7916261c5c
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -12,6 +12,7 @@ export const beforeRegisterGuard: NavigationGuard = async (to, from, next) => {
);
onResult(({ data }) => {
if (!data) return next();
const { config } = data;
if (!config.registrationsOpen && !config.registrationsAllowlist) {