@@ -86,7 +86,7 @@ export default class OutlineViewAdapter {
8686 return symbols . map ( ( symbol ) => {
8787 const tree = OutlineViewAdapter . hierarchicalSymbolToOutline ( symbol )
8888
89- if ( symbol . children != null ) {
89+ if ( symbol . children !== undefined ) {
9090 tree . children = OutlineViewAdapter . createHierarchicalOutlineTrees ( symbol . children )
9191 }
9292
@@ -123,37 +123,37 @@ export default class OutlineViewAdapter {
123123 // Create a map of containers by name with all items that have that name
124124 const containers = allItems . reduce ( ( map , item ) => {
125125 const name = item . outline . representativeName
126- if ( name != null ) {
126+ if ( name !== undefined ) {
127127 const container = map . get ( name )
128- if ( container == null ) {
128+ if ( container === undefined ) {
129129 map . set ( name , [ item . outline ] )
130130 } else {
131131 container . push ( item . outline )
132132 }
133133 }
134134 return map
135- } , new Map ( ) )
135+ } , new Map < string , atomIde . OutlineTree [ ] > ( ) )
136136
137137 const roots : atomIde . OutlineTree [ ] = [ ]
138138
139139 // Put each item within its parent and extract out the roots
140140 for ( const item of allItems ) {
141141 const containerName = item . containerName
142142 const child = item . outline
143- if ( containerName == null || containerName === "" ) {
143+ if ( containerName === undefined || containerName === "" ) {
144144 roots . push ( item . outline )
145145 } else {
146146 const possibleParents = containers . get ( containerName )
147147 let closestParent = OutlineViewAdapter . _getClosestParent ( possibleParents , child )
148- if ( closestParent == null ) {
148+ if ( closestParent === null ) {
149149 closestParent = {
150150 plainText : containerName ,
151151 representativeName : containerName ,
152152 startPosition : new Point ( 0 , 0 ) ,
153153 children : [ child ] ,
154154 }
155155 roots . push ( closestParent )
156- if ( possibleParents == null ) {
156+ if ( possibleParents === undefined ) {
157157 containers . set ( containerName , [ closestParent ] )
158158 } else {
159159 possibleParents . push ( closestParent )
@@ -168,10 +168,10 @@ export default class OutlineViewAdapter {
168168 }
169169
170170 private static _getClosestParent (
171- candidates : atomIde . OutlineTree [ ] | null ,
171+ candidates : atomIde . OutlineTree [ ] | undefined ,
172172 child : atomIde . OutlineTree
173173 ) : atomIde . OutlineTree | null {
174- if ( candidates == null || candidates . length === 0 ) {
174+ if ( candidates === undefined || candidates . length === 0 ) {
175175 return null
176176 }
177177
@@ -186,7 +186,7 @@ export default class OutlineViewAdapter {
186186 if (
187187 parent === undefined ||
188188 parent . startPosition . isLessThanOrEqual ( candidate . startPosition ) ||
189- ( parent . endPosition != null &&
189+ ( parent . endPosition !== undefined &&
190190 candidate . endPosition &&
191191 parent . endPosition . isGreaterThanOrEqual ( candidate . endPosition ) )
192192 ) {
@@ -215,7 +215,7 @@ export default class OutlineViewAdapter {
215215 value : symbol . name ,
216216 } ,
217217 ] ,
218- icon : icon != null ? icon : undefined ,
218+ icon : icon !== null ? icon : undefined ,
219219 representativeName : symbol . name ,
220220 startPosition : Convert . positionToPoint ( symbol . selectionRange . start ) ,
221221 endPosition : Convert . positionToPoint ( symbol . selectionRange . end ) ,
@@ -238,7 +238,7 @@ export default class OutlineViewAdapter {
238238 value : symbol . name ,
239239 } ,
240240 ] ,
241- icon : icon != null ? icon : undefined ,
241+ icon : icon !== null ? icon : undefined ,
242242 representativeName : symbol . name ,
243243 startPosition : Convert . positionToPoint ( symbol . location . range . start ) ,
244244 endPosition : Convert . positionToPoint ( symbol . location . range . end ) ,
0 commit comments