From 50e2b2e75d5f1b722d72b0f29ea9bf00c9b32b5d Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Wed, 11 Jan 2023 10:07:01 -0500 Subject: [PATCH] More clear apiBase initialization Signed-off-by: Sebastian Malton --- src/common/k8s-api/kube-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/k8s-api/kube-api.ts b/src/common/k8s-api/kube-api.ts index 6d4983f773..8e6e86d7da 100644 --- a/src/common/k8s-api/kube-api.ts +++ b/src/common/k8s-api/kube-api.ts @@ -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() {