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

Fix typo KubeObject.nonEditiablePathPrefixes > KubeObject.nonEditablePathPrefixes (#4351)

This commit is contained in:
chh 2021-11-16 14:04:12 +02:00 committed by GitHub
parent 385de469ad
commit 2d5b39e0e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,7 @@ export class KubeObject<Metadata extends KubeObjectMetadata = KubeObjectMetadata
/**
* These must be RFC6902 compliant paths
*/
private static readonly nonEditiablePathPrefixes = [
private static readonly nonEditablePathPrefixes = [
"/metadata/managedFields",
"/status",
];
@ -211,7 +211,7 @@ export class KubeObject<Metadata extends KubeObjectMetadata = KubeObjectMetadata
"/metadata/selfLink",
"/metadata/resourceVersion",
"/metadata/uid",
...KubeObject.nonEditiablePathPrefixes,
...KubeObject.nonEditablePathPrefixes,
]);
constructor(data: KubeJsonApiData) {
@ -315,7 +315,7 @@ export class KubeObject<Metadata extends KubeObjectMetadata = KubeObjectMetadata
throw new Error(`Failed to update ${this.kind}: JSON pointer ${op.path} has been modified`);
}
for (const pathPrefix of KubeObject.nonEditiablePathPrefixes) {
for (const pathPrefix of KubeObject.nonEditablePathPrefixes) {
if (op.path.startsWith(`${pathPrefix}/`)) {
throw new Error(`Failed to update ${this.kind}: Child JSON pointer of ${op.path} has been modified`);
}