1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

More clear apiBase initialization

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-11 10:07:01 -05:00
parent 66c005657f
commit 50e2b2e75d

View File

@ -217,7 +217,7 @@ export class KubeApi<
readonly kind: string;
readonly apiVersion: string;
@observable apiBase = "";
@observable apiBase: string;
apiPrefix: string;
apiGroup: string;
@ -245,7 +245,6 @@ export class KubeApi<
fallbackApiBases,
} = opts;
makeObservable(this);
assert(fullApiPathname, "apiBase MUST be provied either via KubeApiOptions.apiBase or KubeApiOptions.objectConstructor.apiBase");
assert(request, "request MUST be provided if not in a cluster page frame context");
@ -266,6 +265,7 @@ export class KubeApi<
this.apiResource = resource;
this.request = request;
this.objectConstructor = objectConstructor;
makeObservable(this);
}
get apiVersionWithGroup() {