Skip to content

Commit cdc1ad3

Browse files
committed
fix(setConfig): 修复返回undefined时报错
1 parent 6afd43d commit cdc1ad3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/models/Project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Project {
3838
_manager: Manager,
3939
setConfig: ((setFun) => {
4040
let currentConfig = this.config.getConfig(),
41-
nextConfig = setFun(currentConfig);
41+
nextConfig = (setFun && setFun(currentConfig)) || {};
4242

4343
if(nextConfig.context && !sysPath.isAbsolute(nextConfig.context)){
4444
nextConfig.context = sysPath.resolve(this.cwd, nextConfig.context)

0 commit comments

Comments
 (0)