File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,14 @@ export default class OutlineViewAdapter {
110
110
* should be converted to an {OutlineTree}.
111
111
* @returns An {OutlineTree} containing the given symbols that the Outline View can display.
112
112
*/
113
- public static createOutlineTrees ( symbols : SymbolInformation [ ] ) : atomIde . OutlineTree [ ] {
114
- symbols . sort ( ( a , b ) =>
115
- a . location . range . start . line === b . location . range . start . line
116
- ? a . location . range . start . character - b . location . range . start . character
117
- : a . location . range . start . line - b . location . range . start . line
118
- )
113
+ public static createOutlineTrees ( symbols : SymbolInformation [ ] ) : atomIde . OutlineTree [ ] {
114
+ symbols . sort ( ( a , b ) => {
115
+ if ( a . location . range . start . line === b . location . range . start . line ) {
116
+ return a . location . range . start . character - b . location . range . start . character
117
+ } else {
118
+ return a . location . range . start . line - b . location . range . start . line
119
+ }
120
+ } )
119
121
120
122
// Temporarily keep containerName through the conversion process
121
123
// Also filter out symbols without a name - it's part of the spec but some don't include it
You can’t perform that action at this time.
0 commit comments