mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-08-24 04:16:18 +00:00
fix some bugs
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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));
|
||||
}));
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user