Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2fb1ca

Browse files
erha19Aaaaash
andauthored
fix: debug variables order (#4536)
Co-authored-by: 大表哥 <[email protected]>
1 parent 4cba6c8 commit d2fb1ca

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

packages/debug/src/browser/tree/debug-tree-node.define.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,30 +114,12 @@ export class ExpressionTreeService {
114114
}
115115

116116
sortComparator(a: ITreeNodeOrCompositeTreeNode, b: ITreeNodeOrCompositeTreeNode) {
117-
if (a.constructor === b.constructor) {
118-
const aName = a.displayName || a.name;
119-
const bName = b.displayName || b.name;
120-
const isASymbol = !/[a-zA-Z0-9]/.test(aName.charAt(0));
121-
const isBSymbol = !/[a-zA-Z0-9]/.test(bName.charAt(0));
122-
if (isASymbol && !isBSymbol) {
123-
return 1;
124-
} else if (!isASymbol && isBSymbol) {
125-
return -1;
126-
}
127-
return aName.localeCompare(bName, 'en', { numeric: true }) as any;
128-
}
129-
return CompositeTreeNode.is(a) ? -1 : CompositeTreeNode.is(b) ? 1 : 0;
117+
return 0;
130118
}
131119
}
132120

133121
export class DebugConsoleTreeService extends ExpressionTreeService {
134122
sortComparator(a: ITreeNodeOrCompositeTreeNode, b: ITreeNodeOrCompositeTreeNode) {
135-
if (!a) {
136-
return 1;
137-
}
138-
if (!b) {
139-
return -1;
140-
}
141123
return 0;
142124
}
143125
}

packages/debug/src/browser/view/variables/debug-variables.view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export const DebugVariableRenderedNode: React.FC<IDebugVariableNodeRenderedProps
210210
)}
211211
>
212212
{node.displayName}
213-
{(node as DebugVariable).description ? ':' : ''}
213+
{(node as DebugVariable).value ? ':' : ''}
214214
</div>
215215
);
216216

0 commit comments

Comments
 (0)