fix CRD views

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2021-12-03 12:32:00 -05:00
1 parent 444e161f54
commit c3732197be
2 files changed
+4 -6

No files matched your search

@@ -57,9 +57,7 @@ export class CrdResources extends React.Component<Props> {
}
@computed get store() {
if (!this.crd) return null;
return apiManager.getStore(this.crd.getResourceApiBase());
return apiManager.getStore(this.crd?.getResourceApiBase());
}
render() {
@@ -30,9 +30,9 @@ import { KubeObject } from "../../../common/k8s-api/kube-object";
function initStore(crd: CustomResourceDefinition) {
const objectConstructor = class extends KubeObject {
readonly kind = crd.getResourceKind();
readonly namespaced = crd.isNamespaced();
readonly apiBase = crd.getResourceApiBase();
static readonly kind = crd.getResourceKind();
static readonly namespaced = crd.isNamespaced();
static readonly apiBase = crd.getResourceApiBase();
};
const api = apiManager.getApi(objectConstructor.apiBase)