This commit is contained in:
tamaina 2021-01-28 04:11:55 +09:00
parent 6d9221da27
commit 6b11344b16
1 changed files with 1 additions and 0 deletions

View File

@ -50,6 +50,7 @@ export async function getAccounts(): Promise<{ id: Account['id'], token: Account
export async function addAccount(id: Account['id'], token: Account['token']) { export async function addAccount(id: Account['id'], token: Account['token']) {
const accounts = await getAccounts(); const accounts = await getAccounts();
console.log(accounts);
if (!accounts.some(x => x.id === id)) { if (!accounts.some(x => x.id === id)) {
return set('accounts', accounts.concat([{ id, token }])); return set('accounts', accounts.concat([{ id, token }]));
} }