This commit is contained in:
syuilo
2018-04-08 04:44:59 +09:00
parent cebea4e94c
commit 7f448221ce
3 changed files with 8 additions and 3 deletions

View File

@@ -220,7 +220,7 @@ export default class MiOS extends EventEmitter {
public signout() {
localStorage.removeItem('me');
document.cookie = `i=; domain=.${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
document.cookie = `i=; domain=${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
location.href = '/';
}
@@ -325,6 +325,11 @@ export default class MiOS extends EventEmitter {
// キャッシュがあったとき
if (cachedMe) {
if (cachedMe.token == null) {
this.signout();
return;
}
// とりあえずキャッシュされたデータでお茶を濁して(?)おいて、
fetched(cachedMe);