From 4e705d2cb7af922bfc39ed46531bf32dab246599 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 24 Apr 2018 22:26:40 -0400 Subject: [PATCH] fix component binding initialisation --- src/generators/nodes/Binding.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generators/nodes/Binding.ts b/src/generators/nodes/Binding.ts index 2ff5a88ef7..a54d86368a 100644 --- a/src/generators/nodes/Binding.ts +++ b/src/generators/nodes/Binding.ts @@ -41,8 +41,9 @@ export default class Binding extends Node { if (!this.value.node.computed) prop = `'${prop}'`; obj = `[✂${this.value.node.object.start}-${this.value.node.object.end}✂]`; } else { + const { name } = getObject(this.value.node); obj = 'ctx'; - prop = `'${this.name}'`; + prop = `'${name}'`; } this.obj = obj;