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:
parent
a75be2eade
commit
a772ef6b94
@ -52,9 +52,9 @@ export class KubeApi<T extends KubeObject = any> {
|
|||||||
switch (right.length) {
|
switch (right.length) {
|
||||||
case 1:
|
case 1:
|
||||||
name = right[0];
|
name = right[0];
|
||||||
// fallthroughcase 0:
|
// fallthrough
|
||||||
|
case 0:
|
||||||
resource = "namespaces"; // special case this due to `split` removing namespaces
|
resource = "namespaces"; // special case this due to `split` removing namespaces
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
[namespace, resource, name] = right;
|
[namespace, resource, name] = right;
|
||||||
@ -67,7 +67,8 @@ export class KubeApi<T extends KubeObject = any> {
|
|||||||
switch (left.length) {
|
switch (left.length) {
|
||||||
case 2:
|
case 2:
|
||||||
resource = left.pop();
|
resource = left.pop();
|
||||||
// fallthroughcase 1:
|
// fallthrough
|
||||||
|
case 1:
|
||||||
apiVersion = left.pop();
|
apiVersion = left.pop();
|
||||||
apiGroup = "";
|
apiGroup = "";
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user