refactor
This commit is contained in:
parent
fc4cdecae3
commit
02e85ca670
|
@ -142,13 +142,17 @@ const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.d
|
||||||
|
|
||||||
const reactionAcceptance = computed(defaultStore.makeGetterSetter('reactionAcceptance'));
|
const reactionAcceptance = computed(defaultStore.makeGetterSetter('reactionAcceptance'));
|
||||||
|
|
||||||
|
function assertVaildLang(lang: string | null): lang is keyof typeof langmap {
|
||||||
|
return lang != null && lang in langmap;
|
||||||
|
}
|
||||||
|
|
||||||
const profile = reactive({
|
const profile = reactive({
|
||||||
name: $i.name,
|
name: $i.name,
|
||||||
description: $i.description,
|
description: $i.description,
|
||||||
followedMessage: $i.followedMessage,
|
followedMessage: $i.followedMessage,
|
||||||
location: $i.location,
|
location: $i.location,
|
||||||
birthday: $i.birthday,
|
birthday: $i.birthday,
|
||||||
lang: $i.lang,
|
lang: assertVaildLang($i.lang) ? $i.lang : null,
|
||||||
isBot: $i.isBot ?? false,
|
isBot: $i.isBot ?? false,
|
||||||
isCat: $i.isCat ?? false,
|
isCat: $i.isCat ?? false,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue