Skip to content

Commit 0d9ddeb

Browse files
committed
fix: dev tools test error
1 parent c812802 commit 0d9ddeb

File tree

2 files changed

+3
-3
lines changed
  • packages
    • solutions/app-tools/src/plugins/analyze
    • toolkit/plugin-v2/src/cli

2 files changed

+3
-3
lines changed

packages/solutions/app-tools/src/plugins/analyze/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export default ({
203203

204204
builder.onDevCompileDone(
205205
async ({ isFirstCompile, stats, environments }) => {
206-
await hooks.onDevCompileDone.call({
206+
hooks.onDevCompileDone.call({
207207
isFirstCompile,
208208
stats,
209209
environments,

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ export function initPluginAPI<Extends extends CLIPluginExtends>({
116116

117117
return new Proxy(pluginAPI, {
118118
get(target: Record<string, any>, prop: string) {
119-
// hack then function
119+
// hack then function to fix p-defer handle error
120120
if (prop === 'then') {
121-
return undefined; // 返回 undefined,避免被当作 Promise
121+
return undefined;
122122
}
123123
if (prop in target) {
124124
return target[prop];

0 commit comments

Comments
 (0)