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

Fix for #1553
pull/1558/head
Rich Harris 6 years ago committed by GitHub
commit 000dc29a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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