@@ -93,7 +93,7 @@ export default class OutlineViewAdapter {
9393 return symbols . map ( ( symbol ) => {
9494 const tree = OutlineViewAdapter . hierarchicalSymbolToOutline ( symbol )
9595
96- if ( symbol . children != null ) {
96+ if ( symbol . children !== undefined ) {
9797 tree . children = OutlineViewAdapter . createHierarchicalOutlineTrees ( symbol . children )
9898 }
9999
@@ -129,37 +129,37 @@ export default class OutlineViewAdapter {
129129 // Create a map of containers by name with all items that have that name
130130 const containers = allItems . reduce ( ( map , item ) => {
131131 const name = item . outline . representativeName
132- if ( name != null ) {
132+ if ( name !== undefined ) {
133133 const container = map . get ( name )
134- if ( container == null ) {
134+ if ( container === undefined ) {
135135 map . set ( name , [ item . outline ] )
136136 } else {
137137 container . push ( item . outline )
138138 }
139139 }
140140 return map
141- } , new Map ( ) )
141+ } , new Map < string , atomIde . OutlineTree [ ] > ( ) )
142142
143143 const roots : atomIde . OutlineTree [ ] = [ ]
144144
145145 // Put each item within its parent and extract out the roots
146146 for ( const item of allItems ) {
147147 const containerName = item . containerName
148148 const child = item . outline
149- if ( containerName == null || containerName === "" ) {
149+ if ( containerName === undefined || containerName === "" ) {
150150 roots . push ( item . outline )
151151 } else {
152152 const possibleParents = containers . get ( containerName )
153153 let closestParent = OutlineViewAdapter . _getClosestParent ( possibleParents , child )
154- if ( closestParent == null ) {
154+ if ( closestParent === null ) {
155155 closestParent = {
156156 plainText : containerName ,
157157 representativeName : containerName ,
158158 startPosition : new Point ( 0 , 0 ) ,
159159 children : [ child ] ,
160160 }
161161 roots . push ( closestParent )
162- if ( possibleParents == null ) {
162+ if ( possibleParents === undefined ) {
163163 containers . set ( containerName , [ closestParent ] )
164164 } else {
165165 possibleParents . push ( closestParent )
@@ -174,10 +174,10 @@ export default class OutlineViewAdapter {
174174 }
175175
176176 private static _getClosestParent (
177- candidates : atomIde . OutlineTree [ ] | null ,
177+ candidates : atomIde . OutlineTree [ ] | undefined ,
178178 child : atomIde . OutlineTree
179179 ) : atomIde . OutlineTree | null {
180- if ( candidates == null || candidates . length === 0 ) {
180+ if ( candidates === undefined || candidates . length === 0 ) {
181181 return null
182182 }
183183
@@ -192,7 +192,7 @@ export default class OutlineViewAdapter {
192192 if (
193193 parent === undefined ||
194194 parent . startPosition . isLessThanOrEqual ( candidate . startPosition ) ||
195- ( parent . endPosition != null &&
195+ ( parent . endPosition !== undefined &&
196196 candidate . endPosition &&
197197 parent . endPosition . isGreaterThanOrEqual ( candidate . endPosition ) )
198198 ) {
@@ -222,7 +222,7 @@ export default class OutlineViewAdapter {
222222 value : symbol . name ,
223223 } ,
224224 ] ,
225- icon : icon != null ? icon : undefined ,
225+ icon : icon !== null ? icon : undefined ,
226226 representativeName : symbol . name ,
227227 startPosition : Convert . positionToPoint ( symbol . selectionRange . start ) ,
228228 endPosition : Convert . positionToPoint ( symbol . selectionRange . end ) ,
@@ -246,7 +246,7 @@ export default class OutlineViewAdapter {
246246 value : symbol . name ,
247247 } ,
248248 ] ,
249- icon : icon != null ? icon : undefined ,
249+ icon : icon !== null ? icon : undefined ,
250250 representativeName : symbol . name ,
251251 startPosition : Convert . positionToPoint ( symbol . location . range . start ) ,
252252 endPosition : Convert . positionToPoint ( symbol . location . range . end ) ,
0 commit comments