@@ -123,7 +123,7 @@ let openedFilePaths: string[] = [];
123123export function filesOpened ( filePaths : string [ ] ) : void {
124124 openedFilePaths = filePaths ;
125125
126- if ( filePaths . length === 0 ) {
126+ if ( ! filePaths . length ) {
127127 selectedFilePath = null ;
128128 }
129129}
@@ -201,7 +201,7 @@ export class MainWindow extends ApplicationWindow {
201201 // case we filter out all null entries.
202202
203203 recentFilePaths = ( electronConf . get ( 'app.files.recent' ) as string [ ] ) . filter (
204- ( filePath : string | null ) => filePath !== null
204+ ( filePath : string | null ) => filePath
205205 ) ;
206206
207207 updateReopenMenu ( recentFilePaths ) ;
@@ -222,7 +222,7 @@ export class MainWindow extends ApplicationWindow {
222222
223223 commandLine . shift ( ) ;
224224
225- if ( ! isPackaged ( ) && commandLine . length > 0 ) {
225+ if ( ! isPackaged ( ) && commandLine . length ) {
226226 commandLine . shift ( ) ;
227227 }
228228 }
@@ -352,19 +352,19 @@ export class MainWindow extends ApplicationWindow {
352352 // reopen. So, we need to wait for the file to be reopened before reopening the next one.
353353
354354 reopenFilePathsAndSelectFilePath ( ) : void {
355- if ( this . _openedFilePaths . length > 0 ) {
355+ if ( this . _openedFilePaths . length ) {
356356 const filePath = this . _openedFilePaths [ 0 ] ;
357357
358358 this . webContents . send ( 'open' , filePath ) ;
359359
360360 this . _openedFilePaths = this . _openedFilePaths . slice ( 1 ) ;
361361
362- if ( this . _openedFilePaths . length > 0 ) {
362+ if ( this . _openedFilePaths . length ) {
363363 return ;
364364 }
365365 }
366366
367- if ( this . _selectedFilePath !== '' ) {
367+ if ( this . _selectedFilePath ) {
368368 this . webContents . send ( 'select' , this . _selectedFilePath ) ;
369369
370370 this . _selectedFilePath = '' ;
@@ -374,15 +374,15 @@ export class MainWindow extends ApplicationWindow {
374374 // Handle our command line arguments.
375375
376376 isAction ( argument : string | undefined ) : boolean {
377- if ( argument === undefined ) {
377+ if ( ! argument ) {
378378 return false ;
379379 }
380380
381381 return argument . startsWith ( FULL_URI_SCHEME ) ;
382382 }
383383
384384 handleArguments ( commandLine : string [ ] ) : void {
385- if ( commandLine . length === 0 ) {
385+ if ( ! commandLine . length ) {
386386 return ;
387387 }
388388
0 commit comments