From 01983da5149b05cfeed727e9047b34fc9ac0d113 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Tue, 5 Feb 2019 14:42:18 +0900
Subject: [PATCH] [Client] Use localStorage instead of window

---
 src/client/app/boot.js   | 2 +-
 src/client/app/config.ts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/client/app/boot.js b/src/client/app/boot.js
index 612311ef5..f67c074c1 100644
--- a/src/client/app/boot.js
+++ b/src/client/app/boot.js
@@ -66,7 +66,7 @@
 		lang = settings.device.lang;
 	}
 
-	window.lang = lang;
+	localStorage.setItem('lang', lang);
 	//#endregion
 
 	//#region Fetch locale data
diff --git a/src/client/app/config.ts b/src/client/app/config.ts
index 99ee769f2..7a441fdaa 100644
--- a/src/client/app/config.ts
+++ b/src/client/app/config.ts
@@ -12,7 +12,7 @@ export const hostname = address.hostname;
 export const url = address.origin;
 export const apiUrl = url + '/api';
 export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://') + '/streaming';
-export const lang = window.lang;
+export const lang = localStorage.getItem('lang');
 export const langs = _LANGS_;
 export const locale = JSON.parse(localStorage.getItem('locale'));
 export const copyright = _COPYRIGHT_;