fix indirect bindings

pull/1746/head
Rich Harris 8 years ago
parent 9ef064ecc7
commit 10255a980e

@ -47,10 +47,10 @@ export default class SelectBinding extends BindingWrapper {
}
render(block: Block) {
const allInitialStateIsDefined = `${this.binding.prop} in ctx`;
super.render(block);
const allInitialStateIsDefined = `'${this.object}' in ctx`;
block.builders.hydrate.addLine(
`if (!(${allInitialStateIsDefined})) #component.root._beforecreate.push(${this.handlerName});`
);

Loading…
Cancel
Save