From a54a0d682e7d472b055a527c2417d13cf26e1de8 Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Mon, 10 Feb 2025 13:36:31 -0500 Subject: [PATCH] Fix client-side errors --- frontend/src/stores/authStore.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/stores/authStore.js b/frontend/src/stores/authStore.js index 06a414b..01b345a 100644 --- a/frontend/src/stores/authStore.js +++ b/frontend/src/stores/authStore.js @@ -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) {