Skip to content

Commit 914b1b7

Browse files
committed
Use only labels to sort application node children
This PR fixes #2202. Signed-off-by: Denis Golovin [email protected]
1 parent 388ccc6 commit 914b1b7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/odo.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@ export enum ContextType {
6767
}
6868

6969
function compareNodes(a: OpenShiftObject, b: OpenShiftObject): number {
70-
if (!a.contextValue) return -1;
71-
if (!b.contextValue) return 1;
72-
const acontext = a.contextValue.includes('_') ? a.contextValue.substr(0, a.contextValue.indexOf('_')) : a.contextValue;
73-
const bcontext = b.contextValue.includes('_') ? b.contextValue.substr(0, b.contextValue.indexOf('_')) : b.contextValue;
74-
const t = acontext.localeCompare(bcontext);
75-
return t || a.label.localeCompare(b.label);
70+
return a.label.localeCompare(b.label);
7671
}
7772

7873
function insert(array: OpenShiftObject[], item: OpenShiftObject): OpenShiftObject {

0 commit comments

Comments
 (0)