Cookieを使わないように

This commit is contained in:
syuilo
2018-11-28 16:19:02 +09:00
parent f257853906
commit 4bbb7eded3
5 changed files with 7 additions and 12 deletions

View File

@@ -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) {