File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
function dirReducer ( dir ) {
3
- if ( ! atom ) {
4
- throw new Error ( 'No project directory found. Atom may not be initialized.' ) ;
5
- }
6
3
if ( atom && atom . project . rootDirectories . length > 0 ) {
7
4
return atom . project . rootDirectories [ 0 ] . path ;
8
5
}
6
+ return '' ;
9
7
}
10
8
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
11
9
exports . default = dirReducer ;
Original file line number Diff line number Diff line change 5
5
*/
6
6
export default function dirReducer (
7
7
dir : string
8
- ) : string | void {
9
- if ( ! atom ) {
10
- throw new Error ( 'No project directory found. Atom may not be initialized.' ) ;
11
- }
8
+ ) : string {
12
9
if ( atom && atom . project . rootDirectories . length > 0 ) {
13
10
return atom . project . rootDirectories [ 0 ] . path ;
14
11
}
12
+ return '' ;
15
13
}
You can’t perform that action at this time.
0 commit comments