Skip to content

Commit

Permalink
fix(plugin-compiler): 修复 autoInjectRuntime.api 设为 true,未自动转换为 enhance…
Browse files Browse the repository at this point in the history
…d 引发的 ts 类型报错 (#82)
  • Loading branch information
BboyZaki authored Jul 17, 2023
1 parent aadb9fb commit 4d5a660
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/plugin-compiler/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ export function applyDefaults(
userConfig.autoInjectRuntime.component =
userConfig.autoInjectRuntime.component ?? true
userConfig.autoInjectRuntime.api =
userConfig.autoInjectRuntime.api ?? GlobalObjectTransformTypes.enhanced
userConfig.autoInjectRuntime.api === true
? GlobalObjectTransformTypes.enhanced
: userConfig.autoInjectRuntime.api ??
GlobalObjectTransformTypes.enhanced
if (sourceType !== SourceTypes.alipay) {
userConfig.autoInjectRuntime.behavior =
userConfig.autoInjectRuntime.behavior ?? true
Expand Down

0 comments on commit 4d5a660

Please sign in to comment.