mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix incorrect KubeApi.parseApi merge (namespaces parsing issue)
This commit is contained in:
1 parent
a75be2eade
commit
a772ef6b94
1 file changed
+4
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user