Skip to content

Commit

Permalink
Merge pull request #1558 from sveltejs/revert-1557-1553-return-from-c…
Browse files Browse the repository at this point in the history
…ustom-event-handler

Revert "Fix for #1553"
  • Loading branch information
Rich-Harris authored Jun 23, 2018
2 parents 000dc29 + ce575e1 commit 685a36f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/compile/nodes/EventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ export default class EventHandler extends Node {
compiler.code.overwrite(
this.insertionPoint,
this.insertionPoint + 1,
`return ${component}.store.`
`${component}.store.`
);
} else {
compiler.code.prependRight(
this.insertionPoint,
`return ${component}.`
`${component}.`
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/js/samples/event-handlers-custom/expected-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function create_main_fragment(component, ctx) {
button = createElement("button");
button.textContent = "foo";
foo_handler = foo.call(component, button, function(event) {
return component.foo( ctx.bar );
component.foo( ctx.bar );
});
},

Expand Down
2 changes: 1 addition & 1 deletion test/js/samples/event-handlers-custom/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function create_main_fragment(component, ctx) {
button = createElement("button");
button.textContent = "foo";
foo_handler = foo.call(component, button, function(event) {
return component.foo( ctx.bar );
component.foo( ctx.bar );
});
},

Expand Down

0 comments on commit 685a36f

Please sign in to comment.