Skip to content

Commit

Permalink
fix(transform-wx): 修复微信开发者工具key警告(使用常量key判断) (#5181)
Browse files Browse the repository at this point in the history
  • Loading branch information
manfwh authored and luckyadam committed Dec 24, 2019
1 parent 28a88fd commit da2f7ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-transformer-wx/src/create-html-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function stringifyAttributes (input: object, componentName: string) {
}
}

if (Adapters.weapp === Adapter.type && key === 'key' && typeof value === 'string') {
if (Adapters.weapp === Adapter.type && key === Adapter.key && typeof value === 'string') {
if (value.startsWith(LOOP_ORIGINAL)) {
value = value.replace(LOOP_ORIGINAL + '.', '')
}
Expand Down

0 comments on commit da2f7ad

Please sign in to comment.