fix uncaught errors

This commit is contained in:
pa
2025-07-14 21:52:48 +09:00
committed by Natsumi
parent b5b962b198
commit 6fb2ad158e
4 changed files with 39 additions and 24 deletions

View File

@@ -75,13 +75,22 @@ export const useAuthStore = defineStore('Auth', () => {
configRepository.getString('lastUserLoggedIn'),
configRepository.getBool('VRCX_enableCustomEndpoint', false)
]);
state.loginForm = {
...state.loginForm,
savedCredentials: savedCredentials
? JSON.parse(savedCredentials)
: {},
lastUserLoggedIn
};
try {
state.loginForm = {
...state.loginForm,
savedCredentials: savedCredentials
? JSON.parse(savedCredentials)
: {},
lastUserLoggedIn
};
} catch (error) {
console.error('Failed to parse savedCredentials:', error);
state.loginForm = {
...state.loginForm,
savedCredentials: {},
lastUserLoggedIn
};
}
state.enableCustomEndpoint = enableCustomEndpoint;
}