File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed
src/vs/workbench/contrib/scm/browser Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -1171,28 +1171,16 @@ export class SCMTreeSorter implements ITreeSorter<TreeElement> {
1171
1171
return 1 ;
1172
1172
}
1173
1173
1174
- if ( isSCMViewSeparator ( one ) ) {
1175
- if ( ! isSCMHistoryItemGroupTreeElement ( other ) && ! isSCMResourceGroup ( other ) ) {
1176
- throw new Error ( 'Invalid comparison' ) ;
1177
- }
1178
-
1179
- return 0 ;
1180
- }
1181
-
1182
1174
if ( isSCMResourceGroup ( one ) ) {
1183
- if ( ! isSCMResourceGroup ( other ) ) {
1184
- throw new Error ( 'Invalid comparison' ) ;
1185
- }
1175
+ return isSCMResourceGroup ( other ) ? 0 : - 1 ;
1176
+ }
1186
1177
1187
- return 0 ;
1178
+ if ( isSCMViewSeparator ( one ) ) {
1179
+ return isSCMResourceGroup ( other ) ? 1 : - 1 ;
1188
1180
}
1189
1181
1190
1182
if ( isSCMHistoryItemGroupTreeElement ( one ) ) {
1191
- if ( ! isSCMHistoryItemGroupTreeElement ( other ) && ! isSCMResourceGroup ( other ) && ! isSCMViewSeparator ( other ) ) {
1192
- throw new Error ( 'Invalid comparison' ) ;
1193
- }
1194
-
1195
- return 0 ;
1183
+ return isSCMHistoryItemGroupTreeElement ( other ) ? 0 : 1 ;
1196
1184
}
1197
1185
1198
1186
if ( isSCMHistoryItemTreeElement ( one ) ) {
You can’t perform that action at this time.
0 commit comments