Skip to content

Commit b3e25e4

Browse files
committed
simplify
1 parent b421ce0 commit b3e25e4

File tree

1 file changed

+1
-2
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client/visitors/shared

1 file changed

+1
-2
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/element.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export function build_set_attributes(
3838

3939
if (
4040
is_event_attribute(attribute) &&
41-
(get_attribute_expression(attribute).type === 'ArrowFunctionExpression' ||
42-
get_attribute_expression(attribute).type === 'FunctionExpression')
41+
(value.type === 'ArrowFunctionExpression' || value.type === 'FunctionExpression')
4342
) {
4443
// Give the event handler a stable ID so it isn't removed and readded on every update
4544
const id = context.state.scope.generate('event_handler');

0 commit comments

Comments
 (0)