diff --git a/src/stores/user.js b/src/stores/user.js index 7f9d8a54..992e6e06 100644 --- a/src/stores/user.js +++ b/src/stores/user.js @@ -250,6 +250,11 @@ export const useUserStore = defineStore('user', () => { try { const userData = await api.get('VnUsers/getCurrentUserData'); + if (!userData?.data) { + console.error('GET VnUsers/getCurrentUserData returned invalid data', userData); + return; + } + if (userType === 'user') mainUser.value = userData.data; else supplantedUser.value = userData.data; } catch (error) {