修正
This commit is contained in:
parent
8a5daa866c
commit
57e1ddcd3f
2 changed files with 25 additions and 23 deletions
|
@ -33,7 +33,7 @@ html
|
|||
script.
|
||||
const token = '#{token}';
|
||||
const previousToken = localStorage.getItem('token');
|
||||
const accounts = JSON.parse(localStorage.getItem('accounts') && '[]');
|
||||
const accounts = JSON.parse(localStorage.getItem('accounts') || '[]');
|
||||
if (previousToken && !accounts.includes(previousToken)) {
|
||||
accounts.push(previousToken);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue