Skip to content

Commit 414eb98

Browse files
authored
fix: failed to create with builtin tools (#86)
1 parent 23fc08f commit 414eb98

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,15 @@ export async function create({
347347
const matchedTool = extraTools.find(
348348
(extraTool) => extraTool.value === tool,
349349
);
350-
if (matchedTool?.action) {
351-
await matchedTool.action();
352-
}
353-
if (matchedTool?.command) {
354-
runCommand(matchedTool.command, distFolder);
350+
if (matchedTool) {
351+
if (matchedTool.action) {
352+
await matchedTool.action();
353+
}
354+
if (matchedTool.command) {
355+
runCommand(matchedTool.command, distFolder);
356+
}
357+
continue;
355358
}
356-
continue;
357359
}
358360

359361
// Handle built-in tools

0 commit comments

Comments
 (0)