contextual binding fix

pull/1864/head
Rich Harris 7 years ago
parent 989cc6d6b4
commit 0adadd928f

@ -446,7 +446,7 @@ export default class ElementWrapper extends Wrapper {
group.bindings.forEach(binding => { group.bindings.forEach(binding => {
addToSet(dependencies, binding.dependencies); addToSet(dependencies, binding.dependencies);
addToSet(contextual_dependencies, binding.handler.contextual_dependencies); addToSet(contextual_dependencies, binding.contextual_dependencies);
if (!binding.updateDom) return; if (!binding.updateDom) return;

@ -50,12 +50,12 @@ export default {
}, },
}, },
test(assert, component, target, window) { async test(assert, component, target, window) {
const input = document.querySelectorAll('input[type="checkbox"]')[2]; const input = document.querySelectorAll('input[type="checkbox"]')[2];
const change = new window.Event('change'); const change = new window.Event('change');
input.checked = true; input.checked = true;
input.dispatchEvent(change); await input.dispatchEvent(change);
assert.ok(component.todos.third.done); assert.ok(component.todos.third.done);
assert.htmlEqual(target.innerHTML, ` assert.htmlEqual(target.innerHTML, `

Loading…
Cancel
Save