This commit is contained in:
syuilo 2025-08-25 13:51:52 +09:00
parent 7c761e7017
commit d336a1fb1c
1 changed files with 10 additions and 1 deletions

View File

@ -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;