on second thoughts

pull/3147/head
Rich Harris 6 years ago
parent 91aabf5f49
commit 7a11b7531b

@ -17,7 +17,7 @@ export default class Action extends Node {
component.qualify(info.name); component.qualify(info.name);
this.expression = info.expression this.expression = info.expression
? new Expression(component, this, scope, info.expression, true) ? new Expression(component, this, scope, info.expression)
: null; : null;
this.uses_context = this.expression && this.expression.uses_context; this.uses_context = this.expression && this.expression.uses_context;

@ -146,11 +146,11 @@ export default class Expression {
contextual_dependencies.add(name); contextual_dependencies.add(name);
if (!function_expression || !lazy) { if (!lazy) {
template_scope.dependencies_for_name.get(name).forEach(name => dependencies.add(name)); template_scope.dependencies_for_name.get(name).forEach(name => dependencies.add(name));
} }
} else { } else {
if (!function_expression || !lazy) { if (!lazy) {
dependencies.add(name); dependencies.add(name);
} }

@ -23,7 +23,12 @@ function create_fragment(ctx) {
foo_action = foo.call(null, button, ctx.foo_function) || {}; foo_action = foo.call(null, button, ctx.foo_function) || {};
}, },
p: noop, p(changed, ctx) {
if (typeof foo_action.update === 'function' && changed.bar) {
foo_action.update.call(null, ctx.foo_function);
}
},
i: noop, i: noop,
o: noop, o: noop,

Loading…
Cancel
Save