File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ const isFilePromise = (file) =>
1616 if ( err ) {
1717 reject ( err ) ;
1818 }
19- if ( stats === undefined ) {
20- resolve ( false ) ;
21- }
22- resolve ( stats . isFile ( ) ) ;
19+ resolve ( stats === undefined ? false : stats . isFile ( ) ) ;
2320 } ) ;
2421 } ) ;
2522const isBuffer = ( file ) => file instanceof Buffer ;
Original file line number Diff line number Diff line change @@ -8,10 +8,7 @@ const isFilePromise = (file) =>
88 if ( err ) {
99 reject ( err ) ;
1010 }
11- if ( stats === undefined ) {
12- resolve ( false ) ;
13- }
14- resolve ( stats . isFile ( ) ) ;
11+ resolve ( stats === undefined ? false : stats . isFile ( ) ) ;
1512 } ) ;
1613 } ) ;
1714const isBuffer = ( file ) => file instanceof Buffer ;
Original file line number Diff line number Diff line change @@ -9,10 +9,7 @@ const isFilePromise = (file: string | Buffer): Promise<boolean> =>
99 if ( err ) {
1010 reject ( err ) ;
1111 }
12- if ( stats === undefined ) {
13- resolve ( false ) ;
14- }
15- resolve ( stats . isFile ( ) ) ;
12+ resolve ( stats === undefined ? false : stats . isFile ( ) ) ;
1613 } ) ;
1714 } ) ;
1815
You can’t perform that action at this time.
0 commit comments