From 63e5d1f5a9d0befbbfa2e7db7eec87f1ba0dbe1d Mon Sep 17 00:00:00 2001 From: Th0r Date: Sat, 2 May 2020 01:29:52 +0500 Subject: [PATCH] Fix bind:this in each repetitive variable --- src/compiler/compile/render_dom/wrappers/shared/bind_this.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts b/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts index 97199a71c2..b5df0489df 100644 --- a/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts +++ b/src/compiler/compile/render_dom/wrappers/shared/bind_this.ts @@ -54,6 +54,9 @@ export default function bind_this(component: Component, block: Block, binding: B const args = []; for (const id of contextual_dependencies) { + if (block.variables.has(id.name)) { + if (block.renderer.context_lookup.get(id.name).is_contextual) continue; + } args.push(id); block.add_variable(id, block.renderer.reference(id.name)); }