Skip to content

Commit

Permalink
fix(compiler-core): transform kebab case props to camelcase on slots (c…
Browse files Browse the repository at this point in the history
…lose #2488)
  • Loading branch information
edison1105 committed Nov 10, 2020
1 parent 9a9cb04 commit 061dac7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/compiler-core/src/transforms/transformSlotOutlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ export function processSlotOutlet(
: node.props

if (propsWithoutName.length > 0) {
debugger
//#2488
propsWithoutName.forEach(prop => {
if (prop.type === NodeTypes.DIRECTIVE) {
const arg = prop.arg as any
if (arg) {
arg.content = camelize(arg.content)
}
if (
prop.type === NodeTypes.DIRECTIVE &&
prop.arg &&
prop.arg.type === NodeTypes.SIMPLE_EXPRESSION
) {
prop.arg.content = camelize(prop.arg.content)
}
})

Expand Down

0 comments on commit 061dac7

Please sign in to comment.