Skip to content

Commit fb8b531

Browse files
committed
🐛 fix(app): 修复空参数
1 parent 86297f6 commit fb8b531

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/command/eslint-fix/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const eslintFix = async (paths: string[]) => {
2323
};
2424

2525
export default function eslintFixInstaller(config: CommandsOptions) {
26-
const { fix } = config;
26+
const { fix } = config || {};
2727
return {
2828
name: "fix",
2929
describe: "运行 eslint 静态扫描和修复代码中存在的问题",

src/command/git-commit/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const gitCommit = async (
109109
};
110110

111111
export default function gitCommitInstaller(config: CommandsOptions) {
112-
const { commit } = config;
112+
const { commit } = config || {};
113113
return {
114114
name: "commit",
115115
describe: "生成 angualr 规范的提交信息",

0 commit comments

Comments
 (0)