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

fix CRD views

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

View File

@ -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() {

View File

@ -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)