From 501bf9016405a1808ee58cc122a89c6c08c9a521 Mon Sep 17 00:00:00 2001 From: kongjiacong Date: Thu, 12 Dec 2024 20:53:55 +0800 Subject: [PATCH] fix: setup can be empty --- packages/toolkit/plugin-v2/src/cli/run/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/plugin-v2/src/cli/run/create.ts b/packages/toolkit/plugin-v2/src/cli/run/create.ts index b135fde72f27..6735b13cf478 100644 --- a/packages/toolkit/plugin-v2/src/cli/run/create.ts +++ b/packages/toolkit/plugin-v2/src/cli/run/create.ts @@ -80,7 +80,7 @@ export const createCli = () => { context.pluginAPI = pluginAPI; for (const plugin of plugins) { - const setupResult = await plugin.setup(pluginAPI); + const setupResult = await plugin.setup?.(pluginAPI); if (handleSetupResult) { await handleSetupResult(setupResult, pluginAPI); }