mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Only set token if it's truthy.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
parent
93a7a8382c
commit
6d64f10fae
@ -137,7 +137,7 @@ export function forRemoteCluster<T extends KubeObject>(config: IRemoteKubeApiCon
|
|||||||
const reqInit: RequestInit = {};
|
const reqInit: RequestInit = {};
|
||||||
const token = config.user.token;
|
const token = config.user.token;
|
||||||
|
|
||||||
if (!isFunction(token)) {
|
if (token && !isFunction(token)) {
|
||||||
reqInit.headers = {
|
reqInit.headers = {
|
||||||
"Authorization": `Bearer ${token}`
|
"Authorization": `Bearer ${token}`
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user