File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -376,13 +376,11 @@ namespace ts {
376376 /**
377377 * @param watcherPath is the path from which the watcher is triggered.
378378 */
379- function fileEventHandler ( eventName : string , relativefileName : string , baseDirPath : Path ) {
379+ function fileEventHandler ( eventName : string , relativeFileName : string , baseDirPath : Path ) {
380380 // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined"
381- /* tslint:disable:no-null */
382- const filePath = relativefileName === undefined || relativefileName === null
381+ const filePath = typeof relativeFileName !== "string"
383382 ? undefined
384- : toPath ( relativefileName , baseDirPath , createGetCanonicalFileName ( sys . useCaseSensitiveFileNames ) ) ;
385- /* tslint:enable:no-null */
383+ : toPath ( relativeFileName , baseDirPath , createGetCanonicalFileName ( sys . useCaseSensitiveFileNames ) ) ;
386384 if ( eventName === "change" && fileWatcherCallbacks . contains ( filePath ) ) {
387385 for ( const fileCallback of fileWatcherCallbacks . get ( filePath ) ) {
388386 fileCallback ( filePath ) ;
You can’t perform that action at this time.
0 commit comments