Fix client-side errors

This commit is contained in:
2025-02-10 13:36:31 -05:00
parent 4f44ac1883
commit a54a0d682e

View File

@@ -9,7 +9,6 @@ function getClaimsFromToken(token) {
try {
return jwtDecode(token);
} catch (error) {
console.error('Invalid token:', error);
return null;
}
}
@@ -27,7 +26,7 @@ export const useAuthStore = defineStore(
const userId = computed(() => {
const claims = getClaimsFromToken(accessToken.value)
return claims.sub;
return claims?.sub;
})
function updateTokens(data) {