Cookieを使わないように
This commit is contained in:
parent
f257853906
commit
4bbb7eded3
5 changed files with 7 additions and 12 deletions
|
|
@ -190,8 +190,8 @@ export default class MiOS extends EventEmitter {
|
|||
this.store.dispatch('mergeMe', freshData);
|
||||
});
|
||||
} else {
|
||||
// Get token from cookie
|
||||
const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1];
|
||||
// Get token from cookie or localStorage
|
||||
const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1] || localStorage.getItem('i');
|
||||
|
||||
fetchme(i, me => {
|
||||
if (me) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue