refactor: simplify assignment

pull/474/head
Daniel Roe 2022-12-20 14:44:19 +00:00
rodzic 11731ee280
commit ab4321ad33
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 22D5008E4F5D9B55
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -19,9 +19,8 @@ const instances = useLocalStorage<Record<string, Instance>>(STORAGE_KEY_SERVERS,
const currentUserId = useLocalStorage<string>(STORAGE_KEY_CURRENT_USER, mock ? mock.user.account.id : '')
export const currentUser = computed<UserLogin | undefined>(() => {
let user: UserLogin | undefined
if (currentUserId.value) {
user = users.value.find(user => user.account?.id === currentUserId.value)
const user = users.value.find(user => user.account?.id === currentUserId.value)
if (user)
return user
}