fix incorrect KubeApi.parseApi merge (namespaces parsing issue)

This commit is contained in:
Roman committed 2020-06-25 13:01:18 +03:00
1 parent a75be2eade
commit a772ef6b94
1 file changed
+4 -3
+4 -3
View File
@@ -52,9 +52,9 @@ export class KubeApi<T extends KubeObject = any> {
switch (right.length) {
case 1:
name = right[0];
// fallthroughcase 0:
// fallthrough
case 0:
resource = "namespaces"; // special case this due to `split` removing namespaces
break;
default:
[namespace, resource, name] = right;
@@ -67,7 +67,8 @@ export class KubeApi<T extends KubeObject = any> {
switch (left.length) {
case 2:
resource = left.pop();
// fallthroughcase 1:
// fallthrough
case 1:
apiVersion = left.pop();
apiGroup = "";
break;