From a862a91112f0c18cbb2550c68b0fca62fdd727c4 Mon Sep 17 00:00:00 2001 From: Chen-I Lim Date: Wed, 10 Feb 2021 14:07:20 -0800 Subject: [PATCH] Cleanup login client --- webapp/src/octoClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/octoClient.ts b/webapp/src/octoClient.ts index 8ae7fa538..86d7b27f8 100644 --- a/webapp/src/octoClient.ts +++ b/webapp/src/octoClient.ts @@ -46,9 +46,9 @@ class OctoClient { } const responseJson = (await this.getJson(response)) as {token?: string} - this.token = responseJson.token - if (responseJson.token !== '') { - localStorage.setItem('sessionId', this.token || '') + this.token = responseJson.token || '' + if (this.token) { + localStorage.setItem('sessionId', this.token) return true } return false