Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit8d27b84

Browse files
committed
fix dir issue with empty project
1 parent6e013ab commit8d27b84

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

‎lib/modules/dir/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
"use strict";
22
functiondirReducer(dir){
3-
if(!atom){
4-
thrownewError('No project directory found. Atom may not be initialized.');
5-
}
63
if(atom&&atom.project.rootDirectories.length>0){
74
returnatom.project.rootDirectories[0].path;
85
}
6+
return'';
97
}
108
Object.defineProperty(exports,"__esModule",{value:true});
119
exports.default=dirReducer;

‎src/modules/dir/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
*/
66
exportdefaultfunctiondirReducer(
77
dir:string
8-
):string|void{
9-
if(!atom){
10-
thrownewError('No project directory found. Atom may not be initialized.');
11-
}
8+
):string{
129
if(atom&&atom.project.rootDirectories.length>0){
1310
returnatom.project.rootDirectories[0].path;
1411
}
12+
return'';
1513
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp