mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-23 20:43:38 +00:00
refactor
This commit is contained in:
@@ -959,7 +959,16 @@ async function post(ev?: MouseEvent) {
|
||||
|
||||
if (postAccount.value) {
|
||||
const storedAccounts = await getAccounts();
|
||||
token = storedAccounts.find(x => x.id === postAccount.value?.id)?.token;
|
||||
const storedAccount = storedAccounts.find(x => x.id === postAccount.value?.id);
|
||||
if (storedAccount && storedAccount.token != null) {
|
||||
token = storedAccount.token;
|
||||
} else {
|
||||
await os.alert({
|
||||
type: 'error',
|
||||
text: 'cannot find the token of the selected account.',
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
posting.value = true;
|
||||
|
||||
Reference in New Issue
Block a user