diff --git a/src/compile/nodes/Binding.ts b/src/compile/nodes/Binding.ts index 081f736778..3d26d5f34c 100644 --- a/src/compile/nodes/Binding.ts +++ b/src/compile/nodes/Binding.ts @@ -7,7 +7,6 @@ export default class Binding extends Node { name: string; expression: Expression; isContextual: boolean; - usesContext: boolean; obj: string; prop: string; @@ -34,13 +33,9 @@ export default class Binding extends Node { prop = `[✂${this.expression.node.property.start}-${this.expression.node.property.end}✂]`; if (!this.expression.node.computed) prop = `'${prop}'`; obj = `[✂${this.expression.node.object.start}-${this.expression.node.object.end}✂]`; - - this.usesContext = true; } else { obj = 'ctx'; prop = `'${name}'`; - - this.usesContext = scope.names.has(name); } this.obj = obj; diff --git a/src/compile/render-dom/wrappers/Element/index.ts b/src/compile/render-dom/wrappers/Element/index.ts index 9b51799cd2..c2c6403e4c 100644 --- a/src/compile/render-dom/wrappers/Element/index.ts +++ b/src/compile/render-dom/wrappers/Element/index.ts @@ -137,25 +137,11 @@ export default class ElementWrapper extends Wrapper { return new AttributeWrapper(this, block, attribute); }); - let has_bindings; - const binding_lookup = {}; - this.node.bindings.forEach(binding => { - binding_lookup[binding.name] = binding; - has_bindings = true; - }); - - const type = this.node.getStaticAttributeValue('type'); - // ordinarily, there'll only be one... but we need to handle // the rare case where an element can have multiple bindings, // e.g.