From 7f448221ceda4596c5ac0ba2f171f37649d9b156 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 8 Apr 2018 04:44:59 +0900 Subject: Fix bugs --- src/client/app/common/mios.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index fd267bc3f8..7baf974adf 100644 --- a/src/client/app/common/mios.ts +++ b/src/client/app/common/mios.ts @@ -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); -- cgit v1.2.3-freya