Skip to content

Commit cb3f969

Browse files
committed
chore: use if else return instead of ternary
1 parent ed657ec commit cb3f969

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/adapters/outline-view-adapter.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ export default class OutlineViewAdapter {
111111
* @returns An {OutlineTree} containing the given symbols that the Outline View can display.
112112
*/
113113
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-
)
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+
})
119121

120122
// Temporarily keep containerName through the conversion process
121123
// Also filter out symbols without a name - it's part of the spec but some don't include it

0 commit comments

Comments
 (0)