Merge pull request #1557 from PaulMaly/1553-return-from-custom-event-handler

Fix for #1553
pull/7738/head
Rich Harris 7 years ago committed by GitHub
commit a9447e8668

@ -67,12 +67,12 @@ export default class EventHandler extends Node {
compiler.code.overwrite(
this.insertionPoint,
this.insertionPoint + 1,
`${component}.store.`
`return ${component}.store.`
);
} else {
compiler.code.prependRight(
this.insertionPoint,
`${component}.`
`return ${component}.`
);
}
}

@ -146,7 +146,7 @@ function create_main_fragment(component, ctx) {
button = createElement("button");
button.textContent = "foo";
foo_handler = foo.call(component, button, function(event) {
component.foo( ctx.bar );
return component.foo( ctx.bar );
});
},

@ -19,7 +19,7 @@ function create_main_fragment(component, ctx) {
button = createElement("button");
button.textContent = "foo";
foo_handler = foo.call(component, button, function(event) {
component.foo( ctx.bar );
return component.foo( ctx.bar );
});
},

Loading…
Cancel
Save