Skip to content

Commit

Permalink
chore: remove TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Dec 24, 2024
1 parent 1ea6ce2 commit c8f42b6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/compiler-vapor/src/generators/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export function genCreateComponent(
const rawProps = context.withId(() => genRawProps(props, context), ids)
const inlineHandlers: CodeFragment[] = handlers.reduce<CodeFragment[]>(
(acc, { name, value }) => {
// TODO should support .once modifier on component event
const handler = genEventHandler(context, value, undefined,false)
const handler = genEventHandler(context, value, undefined, false)
return [...acc, `const ${name} = `, ...handler, NEWLINE]
},
[],
Expand Down Expand Up @@ -94,10 +93,7 @@ export function genCreateComponent(
}
}

function getUniqueHandlerName(
context: CodegenContext,
name: string
): string {
function getUniqueHandlerName(context: CodegenContext, name: string): string {
const { seenInlineHandlerNames } = context
const count = seenInlineHandlerNames[name] || 0
seenInlineHandlerNames[name] = count + 1
Expand Down

0 comments on commit c8f42b6

Please sign in to comment.