Skip to content

Commit 337210c

Browse files
committed
fix: dev tools test
1 parent 39f955f commit 337210c

File tree

1 file changed

+4
-0
lines changed
  • packages/toolkit/plugin-v2/src/cli

1 file changed

+4
-0
lines changed

packages/toolkit/plugin-v2/src/cli/api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ export function initPluginAPI<Extends extends CLIPluginExtends>({
116116

117117
return new Proxy(pluginAPI, {
118118
get(target: Record<string, any>, prop: string) {
119+
// hack then function
120+
if (prop === 'then') {
121+
return undefined; // 返回 undefined,避免被当作 Promise
122+
}
119123
if (prop in target) {
120124
return target[prop];
121125
}

0 commit comments

Comments
 (0)