pull/4599/head
Antony Jones 5 years ago
parent db8e9806f5
commit 4c5e31db4b

@ -28,7 +28,7 @@ export default class EventHandlerWrapper {
render(block: Block, target: string | Expression) {
if (!this.node.expression) {
if (this.node.name === "*")
if (this.node.name === '*')
block.chunks.bubble.push(b`local_dispose.push(@listen(${target}, type, callback))`);
else
block.chunks.bubble.push(b`if (type === "${this.node.name}") local_dispose.push(@listen(${target}, "${this.node.name}", callback));`);

@ -392,7 +392,7 @@ export default class InlineComponentWrapper extends Wrapper {
.filter(handler => {
if (handler.expression) return true;
if (handler.name === "*")
if (handler.name === '*')
block.chunks.bubble.push(b`local_dispose.push(${name}.$on(type, callback))`);
else
block.chunks.bubble.push(b`if (type === "${handler.name}") local_dispose.push(${name}.$on("${handler.name}", callback));`);

Loading…
Cancel
Save