fix some bugs

This commit is contained in:
Arthur Tu
2021-06-10 11:23:41 -05:00
committed by yuqiuw
parent 9b136739da
commit 155bedb82f
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -18,6 +18,7 @@
"js-cookie": "^2.2.1",
"lodash": "^4.17.19",
"node-sass": "^4.14.1",
"protobufjs": "^6.10.2",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-modal": "^3.11.2",
+1 -1
View File
@@ -63,7 +63,7 @@ async function requestInner(path: string, params?: any, autoLogoutOnAuthError =
export async function request(path: string, params?: any, autoLogoutOnAuthError = true) {
if (isProtoEligible(path) && isProtoEnabled) {
if (isProtoEligible(path) && isProtoEnabled()) {
return requestProto(path, params, autoLogoutOnAuthError).then((value => {
return parser(new Uint8Array(value));
}));
+1 -1
View File
@@ -49,7 +49,7 @@ export function parser(raw: Uint8Array) {
}
}
export function isProtoEnabled(url: string): boolean {
export function isProtoEnabled(): boolean {
return window.localStorage.getItem('protoEnabled') === 'true';
}