refactor: only inject rest args for member expression handlers + fix tests
This commit is contained in:
@@ -102,7 +102,9 @@ export const transformOn: DirectiveTransform = (
|
||||
if (isInlineStatement || (isCacheable && isMemberExp)) {
|
||||
// wrap inline statement in a function expression
|
||||
exp = createCompoundExpression([
|
||||
`($event, ...args) => ${hasMultipleStatements ? `{` : `(`}`,
|
||||
`${isInlineStatement ? `$event` : `($event, ...args)`} => ${
|
||||
hasMultipleStatements ? `{` : `(`
|
||||
}`,
|
||||
exp,
|
||||
hasMultipleStatements ? `}` : `)`
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user