Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 初始化项目的推荐模板无法使用的问题;删除当前展示项目时 git报错 #1344

Merged
merged 2 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/iceworks/renderer/src/components/Scaffold/Item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ScaffoldItem extends Component {
};

createProject = () => {
const { createProject, data, scaffolds = {} } = this.props;
const { createProject, data = {} } = this.props;
const isOfficialSource = /ice\.alicdn\.com\/(pre-)?assets\/react-materials\.json/.test(
scaffolds.material.source
data.source
);
const hasIceScripts = data.builder === 'ice-scripts';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ class Def extends Component {
init() {
const { currentProject = {} } = this.props.projects;
const cwd = currentProject.fullPath;
this.gitTools = new GitTools(cwd);
if (cwd) {
this.gitTools = new GitTools(cwd);
}
clientEmiter.cwd = cwd;
}

Expand Down