diff --git a/src/renderer/components/+custom-resources/crd-resource-details.tsx b/src/renderer/components/+custom-resources/crd-resource-details.tsx index a52d60c7ee..3bd1e821fa 100644 --- a/src/renderer/components/+custom-resources/crd-resource-details.tsx +++ b/src/renderer/components/+custom-resources/crd-resource-details.tsx @@ -15,11 +15,10 @@ import { KubeObjectMeta } from "../kube-object-meta"; import { Input } from "../input"; import type { AdditionalPrinterColumnsV1 } from "../../../common/k8s-api/endpoints/custom-resource-definition.api"; import { CustomResourceDefinition } from "../../../common/k8s-api/endpoints/custom-resource-definition.api"; -import { convertKubectlJsonPathToNodeJsonPath } from "../../utils/jsonPath"; +import { safeJSONPathValue } from "../../utils/jsonPath"; import type { KubeObjectMetadata, KubeObjectStatus } from "../../../common/k8s-api/kube-object"; import { KubeObject } from "../../../common/k8s-api/kube-object"; import logger from "../../../common/logger"; -import { JSONPath } from "@astronautlabs/jsonpath"; export interface CustomResourceDetailsProps extends KubeObjectDetailsProps { crd: CustomResourceDefinition; @@ -66,7 +65,7 @@ export class CustomResourceDetails extends React.Component ( - {convertSpecValue(JSONPath.query(resource, convertKubectlJsonPathToNodeJsonPath(jsonPath)))} + {convertSpecValue(safeJSONPathValue(resource, jsonPath))} )); }