Skip to content

Commit

Permalink
chore: fix iceworks bug (#1344)
Browse files Browse the repository at this point in the history
* fix: 初始化项目的推荐模板无法使用的问题;删除当前展示项目时 git报错

* chore: 代码优化
  • Loading branch information
fenglai0802 authored and chenbin92 committed Jan 17, 2019
1 parent d0a9c45 commit e252938
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit e252938

Please sign in to comment.