Skip to content

Commit 3818f04

Browse files
[autofix.ci] apply automated fixes
1 parent c8f42b6 commit 3818f04

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/compiler-vapor/__tests__/transforms/transformElement.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,7 @@ describe('compiler: element transform', () => {
389389
)
390390
expect(code).toMatchSnapshot()
391391
expect(code).contains(`onBar: () => _on_bar`)
392-
expect(code).contains(
393-
`const _on_bar = () => _ctx.handler`,
394-
)
392+
expect(code).contains(`const _on_bar = () => _ctx.handler`)
395393
expect(ir.block.operation).toMatchObject([
396394
{
397395
type: IRNodeTypes.CREATE_COMPONENT_NODE,
@@ -445,9 +443,7 @@ describe('compiler: element transform', () => {
445443
`const _on_bar = $event => (_ctx.handleBar($event))`,
446444
)
447445
expect(code).contains(`onBar: () => _on_bar1`)
448-
expect(code).contains(
449-
`const _on_bar1 = () => _ctx.handler`,
450-
)
446+
expect(code).contains(`const _on_bar1 = () => _ctx.handler`)
451447
expect(ir.block.operation).toMatchObject([
452448
{
453449
type: IRNodeTypes.CREATE_COMPONENT_NODE,

packages/compiler-vapor/src/generators/event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function genEventHandler(
118118
handlerExp = genWithModifiers(context, handlerExp, nonKeys)
119119
if (keys.length) handlerExp = genWithKeys(context, handlerExp, keys)
120120

121-
if(needWrap) handlerExp.unshift(`() => `)
121+
if (needWrap) handlerExp.unshift(`() => `)
122122
return handlerExp
123123
}
124124

0 commit comments

Comments
 (0)