Skip to content

Commit

Permalink
fix(transformer): 循环组件不加入 $components
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jun 25, 2018
1 parent 911462d commit e53abec
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/taro-transformer-wx/src/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,20 +738,20 @@ function build$ComponentsProperty (
)
)
}
loopComponents.forEach(lc => {
lc.forEach(c => {
if (!properties.some(p => t.isIdentifier(p.key) && p.key.name === c.name)) {
properties.push(
t.objectProperty(
t.identifier(c.name),
t.identifier(
findImportedName(c.name)
)
)
)
}
})
})
// loopComponents.forEach(lc => {
// lc.forEach(c => {
// if (!properties.some(p => t.isIdentifier(p.key) && p.key.name === c.name)) {
// properties.push(
// t.objectProperty(
// t.identifier(c.name),
// t.identifier(
// findImportedName(c.name)
// )
// )
// )
// }
// })
// })
return t.classProperty(
t.identifier('$components'),
t.objectExpression(properties)
Expand Down

0 comments on commit e53abec

Please sign in to comment.